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