Merge branch 'release/3.2'

This commit is contained in:
Dylan K. Taylor 2018-08-06 21:34:07 +01:00
commit 4597899ac3
3 changed files with 4 additions and 2 deletions

View File

@ -56,6 +56,7 @@ class Effect{
public const SATURATION = 23; public const SATURATION = 23;
public const LEVITATION = 24; //TODO public const LEVITATION = 24; //TODO
public const FATAL_POISON = 25; public const FATAL_POISON = 25;
public const CONDUIT_POWER = 26;
/** @var Effect[] */ /** @var Effect[] */
protected static $effects = []; protected static $effects = [];
@ -86,6 +87,7 @@ class Effect{
self::registerEffect(new Effect(Effect::SATURATION, "%potion.saturation", new Color(0xf8, 0x24, 0x23), false, 1)); self::registerEffect(new Effect(Effect::SATURATION, "%potion.saturation", new Color(0xf8, 0x24, 0x23), false, 1));
self::registerEffect(new Effect(Effect::LEVITATION, "%potion.levitation", new Color(0xce, 0xff, 0xff))); self::registerEffect(new Effect(Effect::LEVITATION, "%potion.levitation", new Color(0xce, 0xff, 0xff)));
self::registerEffect(new Effect(Effect::FATAL_POISON, "%potion.poison", new Color(0x4e, 0x93, 0x31), true)); self::registerEffect(new Effect(Effect::FATAL_POISON, "%potion.poison", new Color(0x4e, 0x93, 0x31), true));
self::registerEffect(new Effect(Effect::CONDUIT_POWER, "%potion.conduitPower", new Color(0x1d, 0xc2, 0xd1)));
} }
/** /**

View File

@ -718,7 +718,7 @@ abstract class Living extends Entity implements Damageable{
* @return bool * @return bool
*/ */
public function canBreathe() : bool{ public function canBreathe() : bool{
return $this->hasEffect(Effect::WATER_BREATHING) or !$this->isUnderwater(); return $this->hasEffect(Effect::WATER_BREATHING) or $this->hasEffect(Effect::CONDUIT_POWER) or !$this->isUnderwater();
} }
/** /**

@ -1 +1 @@
Subproject commit 66c471358956c4c826837868af04eab08f3cfdbf Subproject commit 0cd3f8ef307a695eb0c4352db79a26bf7a077b8f