v1.4.2: fixed item buffs acting on-load if the hero has a partial turn
This commit is contained in:
@@ -278,6 +278,17 @@ abstract public class ClassArmor extends Armor {
|
||||
}
|
||||
|
||||
public class Charger extends Buff {
|
||||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
if (super.attachTo( target )) {
|
||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
LockedFloor lock = target.buff(LockedFloor.class);
|
||||
|
||||
@@ -215,6 +215,16 @@ public class Artifact extends KindofMisc {
|
||||
|
||||
public class ArtifactBuff extends Buff {
|
||||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
if (super.attachTo( target )) {
|
||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int itemLevel() {
|
||||
return level();
|
||||
}
|
||||
|
||||
@@ -339,12 +339,20 @@ public class Ring extends KindofMisc {
|
||||
}
|
||||
|
||||
public class RingBuff extends Buff {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
if (super.attachTo( target )) {
|
||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
||||
spend( TICK );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -664,12 +664,15 @@ public abstract class Wand extends Item {
|
||||
private static final float CHARGE_BUFF_BONUS = 0.25f;
|
||||
|
||||
float scalingFactor = NORMAL_SCALE_FACTOR;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean attachTo( Char target ) {
|
||||
super.attachTo( target );
|
||||
|
||||
return true;
|
||||
if (super.attachTo( target )) {
|
||||
//if we're loading in and the hero has partially spent a turn, delay for 1 turn
|
||||
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user