mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
implemented Neyith of the Dire Hunt
This commit is contained in:
parent
00c5162682
commit
73026b57b1
6 changed files with 182 additions and 6 deletions
|
|
@ -308,6 +308,7 @@ public class GameEvent implements Serializable {
|
|||
DESTROYED_PERMANENT,
|
||||
SACRIFICE_PERMANENT, SACRIFICED_PERMANENT,
|
||||
FIGHTED_PERMANENT,
|
||||
BATCH_FIGHT,
|
||||
EXPLOITED_CREATURE,
|
||||
EVOLVED_CREATURE,
|
||||
EMBALMED_CREATURE,
|
||||
|
|
|
|||
|
|
@ -152,6 +152,8 @@ public interface Permanent extends Card, Controllable {
|
|||
|
||||
boolean fight(Permanent fightTarget, Ability source, Game game);
|
||||
|
||||
boolean fight(Permanent fightTarget, Ability source, Game game,boolean batchTrigger);
|
||||
|
||||
boolean entersBattlefield(UUID sourceId, Game game, Zone fromZone, boolean fireEvent);
|
||||
|
||||
String getValue(GameState state);
|
||||
|
|
|
|||
|
|
@ -1559,10 +1559,24 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
@Override
|
||||
public boolean fight(Permanent fightTarget, Ability source, Game game) {
|
||||
return this.fight(fightTarget, source, game, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean fight(Permanent fightTarget, Ability source, Game game, boolean batchTrigger) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.FIGHTED_PERMANENT, fightTarget.getId(), getId(), source.getControllerId()));
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.FIGHTED_PERMANENT, getId(), fightTarget.getId(), source.getControllerId()));
|
||||
damage(fightTarget.getPower().getValue(), fightTarget.getId(), game, false, true);
|
||||
damage(fightTarget.getPower().getValue(), fightTarget.getId(), game);
|
||||
fightTarget.damage(getPower().getValue(), getId(), game);
|
||||
if (!batchTrigger) {
|
||||
return true;
|
||||
}
|
||||
Set<MageObjectReference> morSet = new HashSet<>();
|
||||
morSet.add(new MageObjectReference(this, game));
|
||||
morSet.add(new MageObjectReference(fightTarget, game));
|
||||
String data = UUID.randomUUID().toString();
|
||||
game.getState().setValue("batchFight_" + data, morSet);
|
||||
game.fireEvent(GameEvent.getEvent(EventType.BATCH_FIGHT, getId(), getId(), source.getControllerId(), data, 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue