mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Krark's Thumb - fixed that it can generates too many flip triggers (#12152)
--------- Co-authored-by: Susucre <34709007+Susucre@users.noreply.github.com>
This commit is contained in:
parent
c0c05579ba
commit
28a1442899
4 changed files with 169 additions and 3 deletions
|
|
@ -12,12 +12,14 @@ public class CoinFlippedEvent extends GameEvent {
|
|||
private final boolean result;
|
||||
private final boolean chosen;
|
||||
private final boolean winnable;
|
||||
private final int flipCount; // Number of flips that lead to this event. see [[Krark's Thumb]]
|
||||
|
||||
CoinFlippedEvent(UUID playerId, UUID sourceId, boolean result, boolean chosen, boolean winnable) {
|
||||
CoinFlippedEvent(UUID playerId, UUID sourceId, int flipCount, boolean result, boolean chosen, boolean winnable) {
|
||||
super(GameEvent.EventType.COIN_FLIPPED, playerId, null, playerId);
|
||||
this.result = result;
|
||||
this.chosen = chosen;
|
||||
this.winnable = winnable;
|
||||
this.flipCount = flipCount;
|
||||
this.setSourceId(sourceId);
|
||||
}
|
||||
|
||||
|
|
@ -25,6 +27,10 @@ public class CoinFlippedEvent extends GameEvent {
|
|||
return result;
|
||||
}
|
||||
|
||||
public int getFlipCount() {
|
||||
return flipCount;
|
||||
}
|
||||
|
||||
public String getResultName() {
|
||||
return CardUtil.booleanToFlipName(result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,6 @@ public class FlipCoinEvent extends GameEvent {
|
|||
}
|
||||
|
||||
public CoinFlippedEvent createFlippedEvent() {
|
||||
return new CoinFlippedEvent(playerId, sourceId, result, chosen, winnable);
|
||||
return new CoinFlippedEvent(playerId, sourceId, flipCount, result, chosen, winnable);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue