mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Merge branch 'lost' into 'master'
Fix life lost triggers See merge request core-developers/forge!5218
This commit is contained in:
@@ -208,7 +208,6 @@ public class AiAttackController {
|
|||||||
* @return a boolean.
|
* @return a boolean.
|
||||||
*/
|
*/
|
||||||
public final boolean isEffectiveAttacker(final Player ai, final Card attacker, final Combat combat) {
|
public final boolean isEffectiveAttacker(final Player ai, final Card attacker, final Combat combat) {
|
||||||
|
|
||||||
// if the attacker will die when attacking don't attack
|
// if the attacker will die when attacking don't attack
|
||||||
if ((attacker.getNetToughness() + ComputerUtilCombat.predictToughnessBonusOfAttacker(attacker, null, combat, true)) <= 0) {
|
if ((attacker.getNetToughness() + ComputerUtilCombat.predictToughnessBonusOfAttacker(attacker, null, combat, true)) <= 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ public class CardStorageReader {
|
|||||||
|
|
||||||
private void executeLoadTask(final Collection<CardRules> result, final List<Callable<List<CardRules>>> tasks, final CountDownLatch cdl) {
|
private void executeLoadTask(final Collection<CardRules> result, final List<Callable<List<CardRules>>> tasks, final CountDownLatch cdl) {
|
||||||
try {
|
try {
|
||||||
if ( useThreadPool ) {
|
if (useThreadPool) {
|
||||||
final ExecutorService executor = ThreadUtil.getComputingPool(0.5f);
|
final ExecutorService executor = ThreadUtil.getComputingPool(0.5f);
|
||||||
final List<Future<List<CardRules>>> parts = executor.invokeAll(tasks);
|
final List<Future<List<CardRules>>> parts = executor.invokeAll(tasks);
|
||||||
executor.shutdown();
|
executor.shutdown();
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ public final class CardRules implements ICardCharacteristics {
|
|||||||
String variable = colonPos > 0 ? value.substring(0, colonPos) : value;
|
String variable = colonPos > 0 ? value.substring(0, colonPos) : value;
|
||||||
value = colonPos > 0 ? value.substring(1+colonPos) : null;
|
value = colonPos > 0 ? value.substring(1+colonPos) : null;
|
||||||
|
|
||||||
if ( "RemoveDeck".equals(variable) ) {
|
if ("RemoveDeck".equals(variable)) {
|
||||||
this.removedFromAIDecks |= "All".equalsIgnoreCase(value);
|
this.removedFromAIDecks |= "All".equalsIgnoreCase(value);
|
||||||
this.removedFromRandomDecks |= "Random".equalsIgnoreCase(value);
|
this.removedFromRandomDecks |= "Random".equalsIgnoreCase(value);
|
||||||
this.removedFromNonCommanderDecks |= "NonCommander".equalsIgnoreCase(value);
|
this.removedFromNonCommanderDecks |= "NonCommander".equalsIgnoreCase(value);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class RepeatEffect extends SpellAbilityEffect {
|
|||||||
@Override
|
@Override
|
||||||
protected String getStackDescription(final SpellAbility sa) {
|
protected String getStackDescription(final SpellAbility sa) {
|
||||||
return "Repeat something. Somebody should really write a better StackDescription!";
|
return "Repeat something. Somebody should really write a better StackDescription!";
|
||||||
} // end repeatStackDescription()
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve(final SpellAbility sa) {
|
public void resolve(final SpellAbility sa) {
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ ManaCost:3 W
|
|||||||
Types:Enchantment
|
Types:Enchantment
|
||||||
T:Mode$ Phase | Phase$ Upkeep | CheckSVar$ X | SVarCompare$ GE1 | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of each upkeep, if you lost life last turn, create a 1/1 white Soldier creature token.
|
T:Mode$ Phase | Phase$ Upkeep | CheckSVar$ X | SVarCompare$ GE1 | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of each upkeep, if you lost life last turn, create a 1/1 white Soldier creature token.
|
||||||
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ w_1_1_soldier | TokenOwner$ You | LegacyImage$ w 1 1 soldier m15
|
SVar:TrigToken:DB$ Token | TokenAmount$ 1 | TokenScript$ w_1_1_soldier | TokenOwner$ You | LegacyImage$ w 1 1 soldier m15
|
||||||
SVar:X:Count$Controller$LifeLostLastTurn
|
SVar:X:PlayerCountPropertyYou$LifeLostLastTurn
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/first_response.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/first_response.jpg
|
||||||
Oracle:At the beginning of each upkeep, if you lost life last turn, create a 1/1 white Soldier creature token.
|
Oracle:At the beginning of each upkeep, if you lost life last turn, create a 1/1 white Soldier creature token.
|
||||||
@@ -6,7 +6,7 @@ T:Mode$ Phase | Phase$ Upkeep | CheckSVar$ X | SVarCompare$ GE1 | TriggerZones$
|
|||||||
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, you gain life equal to its toughness.
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerController$ TriggeredCardController | TriggerDescription$ When CARDNAME dies, you gain life equal to its toughness.
|
||||||
SVar:TrigGainLife:DB$GainLife | Defined$ TriggeredCardController | LifeAmount$ Y
|
SVar:TrigGainLife:DB$GainLife | Defined$ TriggeredCardController | LifeAmount$ Y
|
||||||
SVar:X:Count$Controller$LifeLostLastTurn
|
SVar:X:PlayerCountPropertyYou$LifeLostLastTurn
|
||||||
SVar:Y:TriggeredCard$CardToughness
|
SVar:Y:TriggeredCard$CardToughness
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/paladin_of_atonement.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/paladin_of_atonement.jpg
|
||||||
Oracle:At the beginning of each upkeep, if you lost life last turn, put a +1/+1 counter on Paladin of Atonement.\nWhen Paladin of Atonement dies, you gain life equal to its toughness.
|
Oracle:At the beginning of each upkeep, if you lost life last turn, put a +1/+1 counter on Paladin of Atonement.\nWhen Paladin of Atonement dies, you gain life equal to its toughness.
|
||||||
Reference in New Issue
Block a user