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