Commit e26e1f16 authored by salix5's avatar salix5

solve_chain, equip

parent 7f9c0cfb
...@@ -210,9 +210,9 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con ...@@ -210,9 +210,9 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if((handler->data.type & TYPE_MONSTER) && (handler->current.location & LOCATION_SZONE) if((handler->data.type & TYPE_MONSTER) && (handler->current.location & LOCATION_SZONE)
&& !in_range(handler->current.location, handler->current.sequence)) && !in_range(handler->current.location, handler->current.sequence))
return FALSE; return FALSE;
// effects with EFFECT_FLAG_SET_AVAILABLE or cards with STATUS_SET_AVAILABLE can be activated while face-down // effects with EFFECT_FLAG_SET_AVAILABLE can be activated while face-down
if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED)) if((handler->current.location & (LOCATION_ONFIELD | LOCATION_REMOVED))
&& !is_flag(EFFECT_FLAG_SET_AVAILABLE) && !handler->is_status(STATUS_SET_AVAILABLE) && !is_flag(EFFECT_FLAG_SET_AVAILABLE)
&& (code != EVENT_FLIP || !(e.event_value & (FLIP_SET_AVAILABLE >> 16))) && (code != EVENT_FLIP || !(e.event_value & (FLIP_SET_AVAILABLE >> 16)))
&& (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED))) && (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED)))
return FALSE; return FALSE;
......
...@@ -1129,7 +1129,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta ...@@ -1129,7 +1129,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
if(!is_step) { if(!is_step) {
if(equip_card->is_position(POS_FACEUP)) if(equip_card->is_position(POS_FACEUP))
equip_card->enable_field_effect(TRUE); equip_card->enable_field_effect(TRUE);
adjust_instant(); adjust_disable_check_list();
card_set cset; card_set cset;
cset.insert(equip_card); cset.insert(equip_card);
raise_single_event(target, &cset, EVENT_EQUIP, core.reason_effect, 0, core.reason_player, PLAYER_NONE, 0); raise_single_event(target, &cset, EVENT_EQUIP, core.reason_effect, 0, core.reason_player, PLAYER_NONE, 0);
......
...@@ -4668,7 +4668,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2 ...@@ -4668,7 +4668,7 @@ int32 field::solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2
pduel->write_buffer8(MSG_CHAIN_SOLVED); pduel->write_buffer8(MSG_CHAIN_SOLVED);
pduel->write_buffer8(cait->chain_count); pduel->write_buffer8(cait->chain_count);
raise_event((card*)0, EVENT_CHAIN_SOLVED, cait->triggering_effect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); raise_event((card*)0, EVENT_CHAIN_SOLVED, cait->triggering_effect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count);
adjust_instant(); adjust_disable_check_list();
process_instant_event(); process_instant_event();
core.units.begin()->step = 9; core.units.begin()->step = 9;
return FALSE; return FALSE;
...@@ -4776,11 +4776,14 @@ int32 field::break_effect() { ...@@ -4776,11 +4776,14 @@ int32 field::break_effect() {
adjust_instant(); adjust_instant();
return 0; return 0;
} }
// adjust, type 1
// adjust disable, self_destroy
void field::adjust_instant() { void field::adjust_instant() {
adjust_disable_check_list(); adjust_disable_check_list();
adjust_self_destroy_set(); adjust_self_destroy_set();
} }
// this includes adjust_instant() // adjust, type 2 (including adjust_instant())
// adjust win, disable, control, self_destroy, equip, position, trap_monster
void field::adjust_all() { void field::adjust_all() {
core.readjust_map.clear(); core.readjust_map.clear();
add_process(PROCESSOR_ADJUST, 0, 0, 0, 0, 0); add_process(PROCESSOR_ADJUST, 0, 0, 0, 0, 0);
...@@ -5010,8 +5013,8 @@ int32 field::refresh_location_info(uint16 step) { ...@@ -5010,8 +5013,8 @@ int32 field::refresh_location_info(uint16 step) {
} }
return TRUE; return TRUE;
} }
// adjust_all() goes here
int32 field::adjust_step(uint16 step) { int32 field::adjust_step(uint16 step) {
//win, isable, control, self_des, equip, position, trap_monster
switch(step) { switch(step) {
case 0: { case 0: {
core.re_adjust = FALSE; core.re_adjust = FALSE;
......
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