Added Conduit Power effect

This commit is contained in:
max 2018-05-20 11:38:03 +02:00 committed by Dylan K. Taylor
parent c947909c2e
commit f3b2bcfd13
3 changed files with 4 additions and 2 deletions

View File

@ -56,6 +56,7 @@ class Effect{
public const SATURATION = 23;
public const LEVITATION = 24; //TODO
public const FATAL_POISON = 25;
public const CONDUIT_POWER = 26;
/** @var Effect[] */
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::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::CONDUIT_POWER, "%potion.conduitPower", new Color(0x1d, 0xc2, 0xd1)));
}
/**

View File

@ -718,7 +718,7 @@ abstract class Living extends Entity implements Damageable{
* @return 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