forked from External/mage
AI: improved stability and bug fixes (related to #13290):
- bug's reason: wrong usage of canTarget, add/addTarget, getOpponents, etc; - fixed that it can target dead players in some use cases (close #13507); - fixed that it wrongly choose targets in bad/good effects in some use cases; - fixed that it can't find valid targets in some use cases; - fixed game freezes and errors with some cards;
This commit is contained in:
parent
b915c6590b
commit
3dc606501d
10 changed files with 219 additions and 204 deletions
|
|
@ -55,6 +55,9 @@ public interface Target extends Serializable {
|
|||
|
||||
boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game);
|
||||
|
||||
/**
|
||||
* Add target from targeting methods like chooseTarget (will check and generate target events and effects)
|
||||
*/
|
||||
void addTarget(UUID id, Ability source, Game game);
|
||||
|
||||
void addTarget(UUID id, int amount, Ability source, Game game);
|
||||
|
|
@ -90,6 +93,9 @@ public interface Target extends Serializable {
|
|||
|
||||
boolean choose(Outcome outcome, UUID playerId, UUID sourceId, Ability source, Game game);
|
||||
|
||||
/**
|
||||
* Add target from non targeting methods like choose
|
||||
*/
|
||||
void add(UUID id, Game game);
|
||||
|
||||
void remove(UUID targetId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue