Fluorohydride / ygopro-core

ygopro script engine.
MIT License
321 stars 135 forks source link

ocgapi: update signature of start_duel(), add player_info::szone_size #620

Closed salix5 closed 2 weeks ago

salix5 commented 1 month ago

bug-szone6

list_szone[6], list_szone[7] still exist in current rule. We can use Debug.AddCard to add a card in those zones.

Solution: player_info::szone_size The actual size of LOCATION_SZONE in current rule (6 by default). If the duel is started by MASTER_RULE3, it will become 8.

ocgapi: update signature of start_duel()

extern "C" DECL_DLLEXPORT void start_duel(intptr_t pduel, uint32 options);

options is a bit field: 0xFFFF0000 duel_rule

0x0000FFFF duel options

Right shift on signed integer might cause undefined behavior.

@mercury233 @purerosefallen