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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -340,11 +340,19 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -667,10 +667,13 @@ public abstract class Wand extends Item {
|
|||||||
|
|
||||||
@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
|
||||||
|
if (now() == 0 && cooldown() == 0 && target.cooldown() > 0) spend(TICK);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
|
|||||||
Reference in New Issue
Block a user