mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Added Ember Beast, Jackal Familiar and Mogg Flunkies.
Added CARDNAME can't attack or block alone keyword.
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -2780,6 +2780,7 @@ res/cardsfolder/e/elvish_visionary.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/elvish_warrior.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/emancipation_angel.txt -text
|
||||
res/cardsfolder/e/embargo.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/ember_beast.txt -text
|
||||
res/cardsfolder/e/ember_fist_zubera.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/ember_hauler.txt svneol=native#text/plain
|
||||
res/cardsfolder/e/ember_shot.txt svneol=native#text/plain
|
||||
@@ -4767,6 +4768,7 @@ res/cardsfolder/j/jaces_archivist.txt -text
|
||||
res/cardsfolder/j/jaces_erasure.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jaces_ingenuity.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jaces_phantasm.txt -text
|
||||
res/cardsfolder/j/jackal_familiar.txt -text
|
||||
res/cardsfolder/j/jackal_pup.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jackalope_herd.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jacques_le_vert.txt svneol=native#text/plain
|
||||
@@ -5992,6 +5994,7 @@ res/cardsfolder/m/mogg_bombers.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/mogg_cannon.txt -text
|
||||
res/cardsfolder/m/mogg_conscripts.txt -text
|
||||
res/cardsfolder/m/mogg_fanatic.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/mogg_flunkies.txt -text
|
||||
res/cardsfolder/m/mogg_hollows.txt svneol=native#text/plain
|
||||
res/cardsfolder/m/mogg_infestation.txt -text
|
||||
res/cardsfolder/m/mogg_jailer.txt svneol=native#text/plain
|
||||
|
||||
11
res/cardsfolder/e/ember_beast.txt
Normal file
11
res/cardsfolder/e/ember_beast.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Ember Beast
|
||||
ManaCost:2 R
|
||||
Types:Creature Beast
|
||||
Text:no text
|
||||
PT:3/4
|
||||
K:CARDNAME can't attack or block alone.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ember_beast.jpg
|
||||
SetInfo:ODY|Common|http://magiccards.info/scans/en/od/190.jpg
|
||||
Oracle:Ember Beast can't attack or block alone.
|
||||
End
|
||||
11
res/cardsfolder/j/jackal_familiar.txt
Normal file
11
res/cardsfolder/j/jackal_familiar.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Jackal Familiar
|
||||
ManaCost:R
|
||||
Types:Creature Hound
|
||||
Text:no text
|
||||
PT:2/2
|
||||
K:CARDNAME can't attack or block alone.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/jackal_familiar.jpg
|
||||
SetInfo:M10|Common|http://magiccards.info/scans/en/m10/143.jpg
|
||||
Oracle:Jackal Familiar can't attack or block alone.
|
||||
End
|
||||
12
res/cardsfolder/m/mogg_flunkies.txt
Normal file
12
res/cardsfolder/m/mogg_flunkies.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Mogg Flunkies
|
||||
ManaCost:1 R
|
||||
Types:Creature Goblin
|
||||
Text:no text
|
||||
PT:3/3
|
||||
K:CARDNAME can't attack or block alone.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mogg_flunkies.jpg
|
||||
SetInfo:M13|Common|http://magiccards.info/scans/en/m13/143.jpg
|
||||
SetInfo:STH|Common|http://magiccards.info/scans/en/sh/92.jpg
|
||||
Oracle:Mogg Flunkies can't attack or block alone.
|
||||
End
|
||||
@@ -588,6 +588,26 @@ public class Combat {
|
||||
}
|
||||
} // removeFromCombat()
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* undoBlockingAssignment.
|
||||
* </p>
|
||||
*
|
||||
* @param blocker
|
||||
* a {@link forge.Card} object.
|
||||
*/
|
||||
public final void undoBlockingAssignment(final Card blocker) {
|
||||
final CardList att = this.getAttackerList();
|
||||
for (final Card attacker : att) {
|
||||
if (this.getBlockers(attacker).contains(blocker)) {
|
||||
this.getBlockerList(attacker).remove(blocker);
|
||||
if (this.getBlockers(attacker).size() == 0) {
|
||||
this.blocked.remove(attacker);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // undoBlockingAssignment(Card)
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* verifyCreaturesInPlay.
|
||||
|
||||
@@ -99,6 +99,11 @@ public class CombatUtil {
|
||||
}
|
||||
}
|
||||
|
||||
final CardList list = AllZoneUtil.getCreaturesInPlay(blocker.getController());
|
||||
if (list.size() < 2 && blocker.hasKeyword("CARDNAME can't attack or block alone.")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((combat.getAllBlockers().size() > 0) && AllZoneUtil.isCardInPlay("Dueling Grounds")) {
|
||||
return false;
|
||||
}
|
||||
@@ -667,6 +672,11 @@ public class CombatUtil {
|
||||
}
|
||||
}
|
||||
|
||||
final CardList list = AllZoneUtil.getCreaturesInPlay(c.getController());
|
||||
if (list.size() < 2 && c.hasKeyword("CARDNAME can't attack or block alone.")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cntAttackers > 0 && c.hasKeyword("CARDNAME can only attack alone.")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -284,6 +284,17 @@ public class PhaseUtil {
|
||||
*/
|
||||
public static void handleDeclareAttackers() {
|
||||
PhaseUtil.verifyCombat();
|
||||
|
||||
// Handles removing cards like Mogg Flunkies from combat if group attack didn't occur
|
||||
final CardList filterList = AllZone.getCombat().getAttackerList();
|
||||
for (Card c : filterList) {
|
||||
if (c.hasKeyword("CARDNAME can't attack or block alone.") && c.isAttacking()) {
|
||||
if (AllZone.getCombat().getAttackers().size() < 2) {
|
||||
AllZone.getCombat().removeFromCombat(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final CardList list = AllZone.getCombat().getAttackerList();
|
||||
|
||||
// TODO move propaganda to happen as the Attacker is Declared
|
||||
@@ -342,6 +353,16 @@ public class PhaseUtil {
|
||||
public static void handleDeclareBlockers() {
|
||||
PhaseUtil.verifyCombat();
|
||||
|
||||
// Handles removing cards like Mogg Flunkies from combat if group block didn't occur
|
||||
final CardList filterList = AllZone.getCombat().getAllBlockers();
|
||||
for (Card c : filterList) {
|
||||
if (c.hasKeyword("CARDNAME can't attack or block alone.") && c.isBlocking()) {
|
||||
if (AllZone.getCombat().getAllBlockers().size() < 2) {
|
||||
AllZone.getCombat().undoBlockingAssignment(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AllZone.getStack().freezeStack();
|
||||
|
||||
AllZone.getCombat().setUnblocked();
|
||||
|
||||
Reference in New Issue
Block a user