SWU-Karabast / SWUOnline

Star Wars Unlimited Sim
GNU General Public License v3.0
33 stars 27 forks source link

Search blocks minified min and max attack #182

Closed danbastin closed 2 weeks ago

danbastin commented 2 weeks ago
Search.php:94

    if(($type == "" || CardTypeContains($cardID, $type, $player))
        && ($definedType == "" || DefinedTypesContains($cardID, $definedType))
        && ($maxCost == -1 || CardCost($cardID) <= $maxCost)
        && ($minCost == -1 || CardCost($cardID) >= $minCost)
        && ($aspect == "" || AspectContains($cardID, $aspect, $player))
        && ($arena == "" || ArenaContains($cardID, $arena, $player))
        && ($trait == -1 || TraitContains($cardID, $trait, $player, $i))
        && ($maxAttack == -1 || AttackValue($cardID) <= $maxAttack)
        && ($minAttack == -1 || AttackValue($cardID) >= $minAttack)
        && ($keyword == "" || HasKeyword($cardID, $keyword, $player, $i))

The min and max attack here gatekeep units that have had their power modified from being chosen. The reported case that brought this up was a Kanan Jarus that had had its attack reduced (4 -> 2) and could not be targeted by Rey's leader ability.

We should probably reduce the strictness of this if and handle the cases within the if like we do with some of the other conditions.

Bug Report: 671715-0 - Couldn't given Kanan experience with Rey leader after they used make an opening to make it a 2/3

danbastin commented 2 weeks ago

Same block is preventing Kill the Dragon from defeating units buffed into legal range to be targeted.

OotTheMonk commented 2 weeks ago

This should be fixed by @VJubert please let us know if the issue recurs!