mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Converted Reckless Abandon and Goblin Grenade to use DealDamage Ability Factory
- Added Fiery Conclusion, Magma Rift, Shard Volley, Shrapnel Blast, Sonic Burst, Sonic Seizure
This commit is contained in:
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1369,6 +1369,7 @@ res/cardsfolder/fetid_heath.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/fetid_horror.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/feudkillers_verdict.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/field_marshal.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/fiery_conclusion.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/fiery_fall.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/fiery_hellhound.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/fiery_temper.txt -text svneol=native#text/plain
|
||||
@@ -2427,6 +2428,7 @@ res/cardsfolder/maggot_carrier.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/maggot_therapy.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/magma_giant.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/magma_jet.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/magma_rift.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/magnetic_flux.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/magnify.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/magnivore.txt -text svneol=native#text/plain
|
||||
@@ -3495,6 +3497,7 @@ res/cardsfolder/shambling_remains.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shambling_strider.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shanodin_dryads.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shaper_guildmage.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shard_volley.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shared_triumph.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shatter.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shattered_dreams.txt -text svneol=native#text/plain
|
||||
@@ -3529,6 +3532,7 @@ res/cardsfolder/shock_troops.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shore_snapper.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shorecrasher_mimic.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shoreline_ranger.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shrapnel_blast.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shriek_of_dread.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shrieking_specter.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/shriekmaw.txt -text svneol=native#text/plain
|
||||
@@ -3696,6 +3700,8 @@ res/cardsfolder/soltari_trooper.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/somber_hoverguard.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/somnomancer.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/song_of_serenity.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sonic_burst.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sonic_seizure.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sootfeather_flock.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/soothing_balm.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/sootwalkers.txt -text svneol=native#text/plain
|
||||
|
||||
8
res/cardsfolder/fiery_conclusion.txt
Normal file
8
res/cardsfolder/fiery_conclusion.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Fiery Conclusion
|
||||
ManaCost:1 R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$1 R Sac<1/Creature>|Tgt$TgtC|NumDmg$5|SpellDescription$CARDNAME deals 5 damage to target creature.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/fiery_conclusion.jpg
|
||||
End
|
||||
@@ -1,7 +1,8 @@
|
||||
Name:Goblin Grenade
|
||||
ManaCost:R
|
||||
Types:Sorcery
|
||||
Text:As an additional cost to cast Goblin Grenade, sacrifice a Goblin.
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$R Sac<1/Goblin>|Tgt$TgtCP|NumDmg$5|SpellDescription$CARDNAME deals 5 damage to target creature or player.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_grenade.jpg
|
||||
End
|
||||
End
|
||||
8
res/cardsfolder/magma_rift.txt
Normal file
8
res/cardsfolder/magma_rift.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Magma Rift
|
||||
ManaCost:2 R
|
||||
Types:Sorcery
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$2 R Sac<1/Land>|Tgt$TgtC|NumDmg$5|SpellDescription$CARDNAME deals 5 damage to target creature.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/magma_rift.jpg
|
||||
End
|
||||
@@ -1,7 +1,8 @@
|
||||
Name:Reckless Abandon
|
||||
ManaCost:R
|
||||
Types:Sorcery
|
||||
Text:As an additional cost to cast Reckless Abandon, sacrifice a creature.
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$R Sac<1/Creature>|Tgt$TgtCP|NumDmg$4|SpellDescription$CARDNAME deals 4 damage to target creature or player.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/reckless_abandon.jpg
|
||||
End
|
||||
End
|
||||
8
res/cardsfolder/shard_volley.txt
Normal file
8
res/cardsfolder/shard_volley.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Shard Volley
|
||||
ManaCost:R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$R Sac<1/Land>|Tgt$TgtCP|NumDmg$3|SpellDescription$CARDNAME deals 3 damage to target creature or player.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/shard_volley.jpg
|
||||
End
|
||||
8
res/cardsfolder/shrapnel_blast.txt
Normal file
8
res/cardsfolder/shrapnel_blast.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Shrapnel Blast
|
||||
ManaCost:1 R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$1 R Sac<1/Artifact>|Tgt$TgtCP|NumDmg$5|SpellDescription$CARDNAME deals 5 damage to target creature or player.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/shrapnel_blast.jpg
|
||||
End
|
||||
8
res/cardsfolder/sonic_burst.txt
Normal file
8
res/cardsfolder/sonic_burst.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Sonic Burst
|
||||
ManaCost:1 R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$1 R Discard<1/Random>|Tgt$TgtCP|NumDmg$4|SpellDescription$CARDNAME deals 4 damage to target creature or player.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sonic_burst.jpg
|
||||
End
|
||||
8
res/cardsfolder/sonic_seizure.txt
Normal file
8
res/cardsfolder/sonic_seizure.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Sonic Seizure
|
||||
ManaCost:R
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$DealDamage|Cost$R Discard<1/Random>|Tgt$TgtCP|NumDmg$3|SpellDescription$CARDNAME deals 3 damage to target creature or player.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sonic_seizure.jpg
|
||||
End
|
||||
@@ -4116,177 +4116,6 @@ public class CardFactory_Sorceries {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START ************ START **************************
|
||||
else if(cardName.equals("Goblin Grenade") || cardName.equals("Reckless Abandon")) {
|
||||
final int damage = cardName.equals("Reckless Abandon") ? 4 : 5;
|
||||
final String type = cardName.equals("Reckless Abandon") ? "Creature" : "Goblin";
|
||||
final SpellAbility DamageCP = new Spell(card) {
|
||||
private static final long serialVersionUID = -4289150611689144985L;
|
||||
Card check;
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
CardList gobs = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
||||
gobs = gobs.getType(type);
|
||||
|
||||
return super.canPlay() && gobs.size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
if(AllZone.Human_Life.getLife() <= damage) return true;
|
||||
|
||||
PlayerZone compHand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
|
||||
CardList hand = new CardList(compHand.getCards());
|
||||
|
||||
if(hand.size() >= 8) return true;
|
||||
|
||||
check = getFlying();
|
||||
return check != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void chooseTargetAI() {
|
||||
if(AllZone.Human_Life.getLife() <= damage) {
|
||||
setTargetPlayer(Constant.Player.Human);
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerZone compHand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
|
||||
CardList hand = new CardList(compHand.getCards());
|
||||
|
||||
if(getFlying() == null && hand.size() >= 7) //not 8, since it becomes 7 when getting cast
|
||||
{
|
||||
setTargetPlayer(Constant.Player.Human);
|
||||
return;
|
||||
}
|
||||
|
||||
Card c = getFlying();
|
||||
|
||||
if(check == null && c != null) Log.debug(card.getName(), "Check equals null");
|
||||
else if((c == null) || (!check.equals(c))) throw new RuntimeException(card
|
||||
+ " error in chooseTargetAI() - Card c is " + c + ", Card check is " + check);
|
||||
|
||||
setTargetCard(c);
|
||||
}//chooseTargetAI()
|
||||
|
||||
//uses "damage" variable
|
||||
Card getFlying() {
|
||||
CardList flying = CardFactoryUtil.AI_getHumanCreature("Flying", card, true);
|
||||
for(int i = 0; i < flying.size(); i++)
|
||||
if(flying.get(i).getNetDefense() <= damage) {
|
||||
Log.debug(card.getName(), "getFlying() returns " + flying.get(i).getName());
|
||||
return flying.get(i);
|
||||
}
|
||||
|
||||
Log.debug(card.getName(), "getFlying() returned null");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(card.getController().equals(Constant.Player.Computer)) {
|
||||
CardList gobs = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
||||
gobs = gobs.getType(type);
|
||||
|
||||
if(gobs.size() > 0) {
|
||||
CardListUtil.sortAttackLowFirst(gobs);
|
||||
AllZone.GameAction.sacrifice(gobs.get(0));
|
||||
}
|
||||
//TODO, if AI can't sack, break out of this
|
||||
}
|
||||
|
||||
if(getTargetCard() != null) {
|
||||
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
||||
Card c = getTargetCard();
|
||||
//c.addDamage(damage);
|
||||
AllZone.GameAction.addDamage(c, card, damage);
|
||||
}
|
||||
} else AllZone.GameAction.addDamage(getTargetPlayer(), card, damage);
|
||||
//resolve()
|
||||
}
|
||||
}; //spellAbility
|
||||
DamageCP.setDescription(card.getName() + " deals "+damage+" damage to target creature or player.");
|
||||
//DamageCP.setStackDescription(card.getName() +" deals 5 damage.");
|
||||
|
||||
Input target = new Input() {
|
||||
private static final long serialVersionUID = 1843037500197925110L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
AllZone.Display.showMessage("Select target Creature, Player, or Planeswalker");
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectButtonCancel() {
|
||||
stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectCard(Card crd, PlayerZone zone) {
|
||||
if((crd.isCreature() || crd.isPlaneswalker()) && zone.is(Constant.Zone.Play)
|
||||
&& CardFactoryUtil.canTarget(DamageCP, crd)) {
|
||||
DamageCP.setTargetCard(crd);
|
||||
done();
|
||||
}
|
||||
}//selectCard()
|
||||
|
||||
@Override
|
||||
public void selectPlayer(String player) {
|
||||
DamageCP.setTargetPlayer(player);
|
||||
done();
|
||||
}
|
||||
|
||||
void done() {
|
||||
AllZone.Stack.add(DamageCP);
|
||||
stop();
|
||||
}
|
||||
};
|
||||
|
||||
Input targetSac = new Input() {
|
||||
|
||||
private static final long serialVersionUID = -6102143961778874295L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
AllZone.Display.showMessage("Select a "+type+" to sacrifice.");
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectButtonCancel() {
|
||||
stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectCard(Card crd, PlayerZone zone) {
|
||||
CardList choices = new CardList(
|
||||
AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
||||
choices = choices.getType(type);
|
||||
|
||||
if(choices.contains(crd)) {
|
||||
AllZone.GameAction.sacrifice(crd);
|
||||
//DamageCP.setTargetCard(crd);
|
||||
if(DamageCP instanceof Ability_Tap && DamageCP.getManaCost().equals("0")) stopSetNext(new Input_NoCost_TapAbility(
|
||||
(Ability_Tap) DamageCP));
|
||||
else if(DamageCP.getManaCost().equals("0")) {
|
||||
//AllZone.Stack.add(DamageCP);
|
||||
stop();
|
||||
} else stopSetNext(new Input_PayManaCost(DamageCP));
|
||||
}
|
||||
}//selectCard()
|
||||
};
|
||||
|
||||
DamageCP.setBeforePayMana(targetSac);
|
||||
DamageCP.setAfterPayMana(target);
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(DamageCP);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Innocent Blood")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
|
||||
Reference in New Issue
Block a user