mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
*Removed redundant runTrigger in card combat damage code.
*Fixed CardsIn requirement for triggers, let's you require numbers of cards in specified zones of specified players.
This commit is contained in:
@@ -2899,13 +2899,6 @@ public class Card extends MyObservable {
|
|||||||
if (isCreature())
|
if (isCreature())
|
||||||
GameActionUtil.executeCombatDamageToCreatureEffects(source, this, damageToAdd);
|
GameActionUtil.executeCombatDamageToCreatureEffects(source, this, damageToAdd);
|
||||||
GameActionUtil.executeCombatDamageEffects(source, damageToAdd);
|
GameActionUtil.executeCombatDamageEffects(source, damageToAdd);
|
||||||
|
|
||||||
//Run triggers
|
|
||||||
HashMap<String,Object> runParams = new HashMap<String,Object>();
|
|
||||||
runParams.put("DamageSource", source);
|
|
||||||
runParams.put("DamageTarget",this);
|
|
||||||
runParams.put("DamageAmount", damageToAdd);
|
|
||||||
AllZone.TriggerHandler.runTrigger("DamageDone", runParams);
|
|
||||||
}
|
}
|
||||||
map.put(source, damageToAdd);
|
map.put(source, damageToAdd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public abstract class Trigger {
|
|||||||
|
|
||||||
if(mapParams.containsKey("CardsIn"))
|
if(mapParams.containsKey("CardsIn"))
|
||||||
{
|
{
|
||||||
for(String OCIOper : mapParams.get("OpponentCardsIn").split(","))
|
for(String OCIOper : mapParams.get("CardsIn").split(","))
|
||||||
{
|
{
|
||||||
String[] splitOCIO = OCIOper.split("\\.");
|
String[] splitOCIO = OCIOper.split("\\.");
|
||||||
Player player = splitOCIO[0].equals("You") ? hostCard.getController() : hostCard.getController().getOpponent();
|
Player player = splitOCIO[0].equals("You") ? hostCard.getController() : hostCard.getController().getOpponent();
|
||||||
@@ -142,7 +142,7 @@ public abstract class Trigger {
|
|||||||
|
|
||||||
if(!Card.compare(amt,operator,operand))
|
if(!Card.compare(amt,operator,operand))
|
||||||
{
|
{
|
||||||
System.out.println("Requirement failed: Required cards not present/too many cards present.");
|
System.out.println("Requirement failed: Required cards not present/too many cards present in specific zone.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user