forked from External/mage
[WHO] Time Reaper, Add target adjuster for "that player controls/owns" damage trigger targets (#12528)
* Implement Time Reaper, start rework * Create DamagedPlayerControlsTargetAdjuster, convert Aberrant to use it * Always add targets for EachOpponentPermanentTargetsAdjuster * Improve target name, finish Time Reaper * Convert some cards * Improve documentation, more cards * More cards, fix cards that needed to use owner instead of controller * Fix unfinished AlelaCunningConqueror changes * more cards * All remaining cards * Fix target type * Remove outdated attempt at TargetController.SOURCE_EFFECT_TARGET_POINTER * Finish removal of SOURCE_EFFECT_TARGET_POINTER * Change targetAdjuster blueprint target to be set inside setTargetAdjuster, add error checking * Always add Target Adjuster after Target * Add comment * Fix TolarianContemptTest to skip opponent with no valid targets * Forgot to git add the new abstract GenericTargetAdjuster * Test now possible after merge, fix missed ChangeOfPlans adjuster order * Text and optional-ness fixes * Always set target pointer
This commit is contained in:
parent
bccf323c0f
commit
7cb669603f
172 changed files with 891 additions and 2219 deletions
|
|
@ -13,8 +13,7 @@ import mage.target.Target;
|
|||
/**
|
||||
* @author TheElk801, notgreat
|
||||
*/
|
||||
public class PowerTargetAdjuster implements TargetAdjuster {
|
||||
private Target blueprintTarget = null;
|
||||
public class PowerTargetAdjuster extends GenericTargetAdjuster {
|
||||
private final DynamicValue dynamicValue;
|
||||
private final ComparisonType comparison;
|
||||
|
||||
|
|
@ -33,12 +32,9 @@ public class PowerTargetAdjuster implements TargetAdjuster {
|
|||
this(ManacostVariableValue.REGULAR, comparison);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (blueprintTarget == null) {
|
||||
blueprintTarget = ability.getTargets().get(0).copy();
|
||||
blueprintTarget.clearChosen();
|
||||
}
|
||||
Target newTarget = blueprintTarget.copy();
|
||||
int amount = dynamicValue.calculate(game, ability, ability.getEffects().get(0));
|
||||
Filter<MageObject> filter = newTarget.getFilter();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue