v3.0.0: fixed an exploit where guiding light could mitigate encumbrance
This commit is contained in:
@@ -576,7 +576,7 @@ actors.hero.spells.flash.desc=The Cleric channels their ascended form at a nearb
|
|||||||
|
|
||||||
actors.hero.spells.guidinglight.name=guiding light
|
actors.hero.spells.guidinglight.name=guiding light
|
||||||
actors.hero.spells.guidinglight.short_desc=Deals ranged magic damage and guarantees a hit.
|
actors.hero.spells.guidinglight.short_desc=Deals ranged magic damage and guarantees a hit.
|
||||||
actors.hero.spells.guidinglight.desc=The Cleric fires a bolt of magical energy which strikes a target, dealing 2-6 damage and illuminating them. The next physical attack made against an illuminated enemy is guaranteed to hit them.
|
actors.hero.spells.guidinglight.desc=The Cleric fires a bolt of magical energy which strikes a target, dealing 2-6 damage and illuminating them. The next non-encumbered physical attack made against an illuminated enemy is guaranteed to hit them.
|
||||||
actors.hero.spells.guidinglight.desc_priest=_This spell is more powerful when cast by the Priest._ The first cast of the spell every 100 turns costs no tome charges, and illumination can be triggered by wands, other characters, and artifacts that directly affect enemies. When triggered in this way, illuminated deals bonus magic damage equal to the Priest's level.
|
actors.hero.spells.guidinglight.desc_priest=_This spell is more powerful when cast by the Priest._ The first cast of the spell every 100 turns costs no tome charges, and illumination can be triggered by wands, other characters, and artifacts that directly affect enemies. When triggered in this way, illuminated deals bonus magic damage equal to the Priest's level.
|
||||||
actors.hero.spells.guidinglight$guidinglightpriestcooldown.name=Guiding Light
|
actors.hero.spells.guidinglight$guidinglightpriestcooldown.name=Guiding Light
|
||||||
actors.hero.spells.guidinglight$guidinglightpriestcooldown.desc=The Priest will be able to cast Guiding Light for free again after 100 turns elapse.\n\nTurns remaining: %s.
|
actors.hero.spells.guidinglight$guidinglightpriestcooldown.desc=The Priest will be able to cast Guiding Light for free again after 100 turns elapse.\n\nTurns remaining: %s.
|
||||||
|
|||||||
@@ -665,9 +665,21 @@ public abstract class Mob extends Char {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int defenseSkill( Char enemy ) {
|
public int defenseSkill( Char enemy ) {
|
||||||
|
if (buff(GuidingLight.Illuminated.class) != null){
|
||||||
|
//if the attacker is the hero, they must be using a weapon they have the str for
|
||||||
|
if (enemy instanceof Hero){
|
||||||
|
Hero h = (Hero) enemy;
|
||||||
|
if (!(h.belongings.attackingWeapon() instanceof Weapon)
|
||||||
|
|| ((Weapon) h.belongings.attackingWeapon()).STRReq() <= h.STR()){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !surprisedBy(enemy)
|
if ( !surprisedBy(enemy)
|
||||||
&& paralysed == 0
|
&& paralysed == 0
|
||||||
&& buff(GuidingLight.Illuminated.class) == null
|
|
||||||
&& !(alignment == Alignment.ALLY && enemy == Dungeon.hero)) {
|
&& !(alignment == Alignment.ALLY && enemy == Dungeon.hero)) {
|
||||||
return this.defenseSkill;
|
return this.defenseSkill;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user