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
if((handler->data.type & TYPE_MONSTER) && (handler->current.location & LOCATION_SZONE)
&& !in_range(handler->current.location, handler->current.sequence))
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))
&& !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)))
&& (!handler->is_position(POS_FACEUP) || !handler->is_status(STATUS_EFFECT_ENABLED)))
return FALSE;
......
......@@ -1129,7 +1129,7 @@ int32 field::equip(uint16 step, uint8 equip_player, card * equip_card, card * ta
if(!is_step) {
if(equip_card->is_position(POS_FACEUP))
equip_card->enable_field_effect(TRUE);
adjust_instant();
adjust_disable_check_list();
card_set cset;
cset.insert(equip_card);
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
pduel->write_buffer8(MSG_CHAIN_SOLVED);
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);
adjust_instant();
adjust_disable_check_list();
process_instant_event();
core.units.begin()->step = 9;
return FALSE;
......@@ -4776,11 +4776,14 @@ int32 field::break_effect() {
adjust_instant();
return 0;
}
// adjust, type 1
// adjust disable, self_destroy
void field::adjust_instant() {
adjust_disable_check_list();
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() {
core.readjust_map.clear();
add_process(PROCESSOR_ADJUST, 0, 0, 0, 0, 0);
......@@ -5010,8 +5013,8 @@ int32 field::refresh_location_info(uint16 step) {
}
return TRUE;
}
// adjust_all() goes here
int32 field::adjust_step(uint16 step) {
//win, isable, control, self_des, equip, position, trap_monster
switch(step) {
case 0: {
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