mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Added Alpha Brawl.
- DamageAll can now set the damage source with DamageSource param - EachDamage now handles Remembered defined cards - DamageAll and EachDamage support StackDescription param now
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -200,6 +200,7 @@ res/cardsfolder/a/alloy_myr.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/a/alluring_scent.txt svneol=native#text/plain
|
res/cardsfolder/a/alluring_scent.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/alluring_siren.txt svneol=native#text/plain
|
res/cardsfolder/a/alluring_siren.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/alms.txt -text
|
res/cardsfolder/a/alms.txt -text
|
||||||
|
res/cardsfolder/a/alpha_brawl.txt -text
|
||||||
res/cardsfolder/a/alpha_kavu.txt svneol=native#text/plain
|
res/cardsfolder/a/alpha_kavu.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/alpha_myr.txt svneol=native#text/plain
|
res/cardsfolder/a/alpha_myr.txt svneol=native#text/plain
|
||||||
res/cardsfolder/a/alpha_status.txt -text
|
res/cardsfolder/a/alpha_status.txt -text
|
||||||
|
|||||||
17
res/cardsfolder/a/alpha_brawl.txt
Normal file
17
res/cardsfolder/a/alpha_brawl.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Name:Alpha Brawl
|
||||||
|
ManaCost:6 R R
|
||||||
|
Types:Sorcery
|
||||||
|
Text:no text
|
||||||
|
A:SP$ Pump | Cost$ 6 R R | ValidTgts$ Creature.YouDontCtrl | TgtPrompt$ Select target creature an opponent controls | RememberTargets$ True | StackDescription$ None | SubAbility$ AlphaAttack | SpellDescription$ Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those creatures deals damage equal to its power to that creature.
|
||||||
|
SVar:AlphaAttack:DB$DamageAll | ValidCards$ Creature.YouDontCtrl+IsNotRemembered | DamageSource$ Targeted | NumDmg$ Y | SubAbility$ SucksToBeAlpha | StackDescription$ Targeted creature deals damage equal to its power to each other creature that player controls,
|
||||||
|
SVar:SucksToBeAlpha:DB$ EachDamage | ValidCards$ Creature.YouDontCtrl+IsNotRemembered | ValidDescription$ of those creatures | NumDmg$ X | DamageDesc$ damage equal to its power | DefinedCards$ Remembered | SubAbility$ DBCleanup | StackDescription$ then each of those creatures deals damage equal to its power to that creature
|
||||||
|
#NumDmg isn't really used here. It is left for clarity. The AF pulls Damage straight from "X" hardcoded.
|
||||||
|
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||||
|
SVar:X:Count$CardPower
|
||||||
|
SVar:Y:Remembered$CardPower
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/alpha_brawl.jpg
|
||||||
|
SetInfo:DKA|Rare|http://magiccards.info/scans/en/dka/82.jpg
|
||||||
|
Oracle:Target creature an opponent controls deals damage equal to its power to each other creature that player controls, then each of those creatures deals damage equal to its power to that creature.
|
||||||
|
End
|
||||||
@@ -996,7 +996,26 @@ public class AbilityFactoryDealDamage {
|
|||||||
}
|
}
|
||||||
final int dmg = this.getNumDamage(sa);
|
final int dmg = this.getNumDamage(sa);
|
||||||
|
|
||||||
sb.append(name).append(" - Deals " + dmg + " damage to " + desc);
|
if (!(sa instanceof AbilitySub)) {
|
||||||
|
sb.append(name).append(" -");
|
||||||
|
}
|
||||||
|
sb.append(" ");
|
||||||
|
|
||||||
|
if (params.containsKey("StackDescription")) {
|
||||||
|
sb.append(params.get("StackDescription"));
|
||||||
|
} else {
|
||||||
|
final ArrayList<Card> definedSources = AbilityFactory.getDefinedCards(sa.getSourceCard(), af.getMapParams()
|
||||||
|
.get("DamageSource"), sa);
|
||||||
|
final Card source = definedSources.get(0);
|
||||||
|
|
||||||
|
if (source != sa.getSourceCard()) {
|
||||||
|
sb.append(source.toString()).append(" deals");
|
||||||
|
} else {
|
||||||
|
sb.append("Deals");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append(" ").append(dmg).append(" damage to ").append(desc);
|
||||||
|
}
|
||||||
|
|
||||||
final AbilitySub abSub = sa.getSubAbility();
|
final AbilitySub abSub = sa.getSubAbility();
|
||||||
if (abSub != null) {
|
if (abSub != null) {
|
||||||
@@ -1226,7 +1245,9 @@ public class AbilityFactoryDealDamage {
|
|||||||
*/
|
*/
|
||||||
private void damageAllResolve(final AbilityFactory af, final SpellAbility sa) {
|
private void damageAllResolve(final AbilityFactory af, final SpellAbility sa) {
|
||||||
final HashMap<String, String> params = af.getMapParams();
|
final HashMap<String, String> params = af.getMapParams();
|
||||||
final Card card = sa.getSourceCard();
|
final ArrayList<Card> definedSources = AbilityFactory.getDefinedCards(sa.getSourceCard(),
|
||||||
|
params.get("DamageSource"), sa);
|
||||||
|
final Card card = definedSources.get(0);
|
||||||
|
|
||||||
final int dmg = this.getNumDamage(sa);
|
final int dmg = this.getNumDamage(sa);
|
||||||
|
|
||||||
@@ -1426,6 +1447,9 @@ public class AbilityFactoryDealDamage {
|
|||||||
dmg += this.getNumDamage(sa) + " damage";
|
dmg += this.getNumDamage(sa) + " damage";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("StackDescription")) {
|
||||||
|
sb.append(params.get("StackDescription"));
|
||||||
|
} else {
|
||||||
sb.append("Each ").append(desc).append(" deals ").append(dmg).append(" to ");
|
sb.append("Each ").append(desc).append(" deals ").append(dmg).append(" to ");
|
||||||
for (final Player p : tgtPlayers) {
|
for (final Player p : tgtPlayers) {
|
||||||
sb.append(p);
|
sb.append(p);
|
||||||
@@ -1435,6 +1459,7 @@ public class AbilityFactoryDealDamage {
|
|||||||
sb.append(" itself");
|
sb.append(" itself");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sb.append(".");
|
sb.append(".");
|
||||||
|
|
||||||
final AbilitySub abSub = sa.getSubAbility();
|
final AbilitySub abSub = sa.getSubAbility();
|
||||||
@@ -1506,13 +1531,28 @@ public class AbilityFactoryDealDamage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.containsKey("DefinedCards") && params.get("DefinedCards").equals("Self")) {
|
if (params.containsKey("DefinedCards")) {
|
||||||
|
if (params.get("DefinedCards").equals("Self")) {
|
||||||
for (final Card source : sources) {
|
for (final Card source : sources) {
|
||||||
final int dmg = CardFactoryUtil.xCount(source, card.getSVar("X"));
|
final int dmg = CardFactoryUtil.xCount(source, card.getSVar("X"));
|
||||||
// System.out.println(source+" deals "+dmg+" damage to "+source);
|
// System.out.println(source+" deals "+dmg+" damage to "+source);
|
||||||
source.addDamage(dmg, source);
|
source.addDamage(dmg, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (params.get("DefinedCards").equals("Remembered")) {
|
||||||
|
for (final Card source : sources) {
|
||||||
|
final int dmg = CardFactoryUtil.xCount(source, card.getSVar("X"));
|
||||||
|
Card rememberedcard;
|
||||||
|
for (final Object o : sa.getSourceCard().getRemembered()) {
|
||||||
|
if (o instanceof Card) {
|
||||||
|
rememberedcard = (Card) o;
|
||||||
|
// System.out.println(source + " deals " + dmg + " damage to " + rememberedcard);
|
||||||
|
rememberedcard.addDamage(dmg, source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// *************************************************************************
|
// *************************************************************************
|
||||||
// ******************************* Fight ***********************************
|
// ******************************* Fight ***********************************
|
||||||
|
|||||||
Reference in New Issue
Block a user