Commit efcf37aa authored by wind2009's avatar wind2009

Merge remote-tracking branch 'mercury/patch-disable-chain' into develop

parents 19bb8c48 92082ee2
...@@ -21,7 +21,11 @@ Interface provided function that handles error messages. ...@@ -21,7 +21,11 @@ Interface provided function that handles error messages.
These functions create the game itself and then manipulate it. These functions create the game itself and then manipulate it.
- `intptr_t create_duel(uint_fast32_t seed);` - `intptr_t create_duel(uint_fast32_t seed);`
Create a the instance of the duel with a PRNG seed. (Deprecated) Create an instance of `duel` with 1 uint32 PRNG seed.
This function is reserved for replay mode only.
- `intptr_t create_duel_v2(uint32_t seed_sequence[]);`
Create an instance of `duel` with PRNG seed `seed_sequence[]` of length `SEED_COUNT`.
- `void start_duel(intptr_t pduel, uint32_t options);` - `void start_duel(intptr_t pduel, uint32_t options);`
Start the duel. Start the duel.
......
...@@ -149,6 +149,10 @@ int32_t scriptlib::debug_reload_field_begin(lua_State *L) { ...@@ -149,6 +149,10 @@ int32_t scriptlib::debug_reload_field_begin(lua_State *L) {
pduel->game_field->core.duel_rule = 1; pduel->game_field->core.duel_rule = 1;
else else
pduel->game_field->core.duel_rule = CURRENT_RULE; pduel->game_field->core.duel_rule = CURRENT_RULE;
if (pduel->game_field->core.duel_rule == MASTER_RULE3) {
pduel->game_field->player[0].szone_size = 8;
pduel->game_field->player[1].szone_size = 8;
}
return 0; return 0;
} }
int32_t scriptlib::debug_reload_field_end(lua_State *L) { int32_t scriptlib::debug_reload_field_end(lua_State *L) {
......
...@@ -45,8 +45,7 @@ int32_t field::disable_chain(uint8_t chaincount, uint8_t forced) { ...@@ -45,8 +45,7 @@ int32_t field::disable_chain(uint8_t chaincount, uint8_t forced) {
chain& pchain = core.current_chain[chaincount - 1]; chain& pchain = core.current_chain[chaincount - 1];
card* phandler = pchain.triggering_effect->get_handler(); card* phandler = pchain.triggering_effect->get_handler();
if(!(pchain.flag & CHAIN_DISABLE_EFFECT) && is_chain_disablable(pchain.chain_count) if(!(pchain.flag & CHAIN_DISABLE_EFFECT) && is_chain_disablable(pchain.chain_count)
&& (!phandler->is_has_relation(pchain) || phandler->is_affect_by_effect(core.reason_effect)) && (!phandler->is_has_relation(pchain) || phandler->is_affect_by_effect(core.reason_effect))) {
&& !(phandler->is_has_relation(pchain) && phandler->is_status(STATUS_DISABLED) && !forced)) {
core.current_chain[chaincount - 1].flag |= CHAIN_DISABLE_EFFECT; core.current_chain[chaincount - 1].flag |= CHAIN_DISABLE_EFFECT;
core.current_chain[chaincount - 1].disable_reason = core.reason_effect; core.current_chain[chaincount - 1].disable_reason = core.reason_effect;
core.current_chain[chaincount - 1].disable_player = core.reason_player; core.current_chain[chaincount - 1].disable_player = core.reason_player;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment