Allows ritual monsters to be treated as extra deck monsters, to account for the change in RUSH duels. For this implementation, if the flag is used with the extra monster zones enabled, the monster will be summonable to both EMZone and MMZone like other non link cards
Functions from the auxiliary library, assume the stack has always at least 5 empty slots, add macro ensure_luaL_stack to wrap every such call so that the stack is checked for enough free space beforehand. This will make mandatory to use the latest version of visual studio 2017 as minimum for windows (it was already being required for c++17 support regardless), as it needs the conformant c++ preprocessor option to be used.
Properly implement 58c488de9e:
* If only one effect is providing EFFECT_MUST_ATTACK_MONSTER the attack selection proceeds as normal, with the turn player choosing the attack targets
* If multiple effects are providing EFFECT_MUST_ATTACK_MONSTER, the opponent choose the attack target like it did prior to the other change, if then the EFFECT_MUST_ATTACK_MONSTER effect applied on the selected monster was also applying to other monsters, the turn player will then choose among those monsters a valid attack target
Rewrite the whole ``process`` function of the processor to use instead tag dispatching on variant objects.
Each single processor message got rewritten as a struct, inheriting from a base templated Process struct, containing only the required data for that process, rather than using the generic structure that ended up needing to spam bitwise operations to pack as many arguments in a byte as possible. This makes things easier to follow and streamlines the addition of new processes:
- Define its struct with the parameters it expects by also providing a constructor
- If the process requires an answer, inherit it from ``Process<true>``, if it requires no answer, inherit it from ``Process<false>``
- Add such struct to the ``processors`` variant type
- Declare and implement its corresponding ``bool process(Processors::NewProcess& arg);`` function
Added new flags for Duel.GetChainInfo:
TRIGGERING_STATUS: the status of the card
TRIGGERING_SUMMON_LOCATION: the summon location of the card
TRIGGERING_SUMMON_TYPE: its summon type
TRIGGERING_SUMMON_PROC_COMPLETE: if the card was properly summoned or not when it triggered the effect
TRIGGERING_SETCODES: the archetypes the card had when it activated the effect
* Update Card.IsReleasable to accept a second, optional parameter for the reason. Update GetReleaseGroup, GetReleaseGroupCount the same way as well, with the new parameter being the 4th. Defaulting it to REASON_COST will prevent massive script changes (cards that tribute by effect already use Card.IsReleasableByEffect).
* Update EFFECT_CANNOT_RELEASE to pass the reason and the reason effect a 4th and 5th parameters to its target function
* Pass the reason down the line until get_release_list, check_release_list,is_player_can_release and card::is_releasable_by_nonsummon, updating internal function calls accordingly
---------
Co-authored-by: Edoardo Lolletti <edoardo762@gmail.com>
LOCATION_STZONE (the Spell & Trap zone, so excluding mr3 pzones and field zone), LOCATION_MMZONE and LOCATION_EMZONE. Usable in GetMatchingCard, GetFieldGroup, etc
The given lua stack to a c function has enough room to push few return values without issues, so all the functions that return a fixed amount of values (usually 1 or 2) weren't touched, all the others that return an unknown amount are now properly calling checkstack to make the lua api allocate the space needed for all the return values.