v0.9.0: adjusted frost/chill/burning when the hero is immune to them
This commit is contained in:
parent
3c4cb08cd2
commit
afa281d47a
|
@ -75,6 +75,13 @@ public class Burning extends Buff implements Hero.Doom {
|
|||
burnIncrement = bundle.getInt( BURN );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attachTo(Char target) {
|
||||
Buff.detach( target, Chill.class);
|
||||
|
||||
return super.attachTo(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
||||
|
|
|
@ -39,15 +39,9 @@ public class Chill extends FlavourBuff {
|
|||
|
||||
@Override
|
||||
public boolean attachTo(Char target) {
|
||||
//can't chill what's frozen!
|
||||
if (target.buff(Frost.class) != null) return false;
|
||||
Buff.detach( target, Burning.class );
|
||||
|
||||
if (super.attachTo(target)){
|
||||
Buff.detach( target, Burning.class );
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return super.attachTo(target);
|
||||
}
|
||||
|
||||
//reduces speed by 10% for every turn remaining, capping at 50%
|
||||
|
|
|
@ -49,10 +49,11 @@ public class Frost extends FlavourBuff {
|
|||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
Buff.detach( target, Burning.class );
|
||||
|
||||
if (super.attachTo( target )) {
|
||||
|
||||
target.paralysed++;
|
||||
Buff.detach( target, Burning.class );
|
||||
Buff.detach( target, Chill.class );
|
||||
|
||||
if (target instanceof Hero) {
|
||||
|
@ -138,4 +139,9 @@ public class Frost extends FlavourBuff {
|
|||
return Messages.get(this, "desc", dispTurns());
|
||||
}
|
||||
|
||||
{
|
||||
//can't chill what's frozen!
|
||||
immunities.add( Chill.class );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user