Commit a258dd0d authored by DailyShana's avatar DailyShana

add EFFECT_SKIP_EP, update EFFECT_SKIP_BP

parent 2504f2bc
...@@ -345,6 +345,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2) ...@@ -345,6 +345,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EFFECT_CANNOT_M2 186 #define EFFECT_CANNOT_M2 186
#define EFFECT_CANNOT_EP 187 #define EFFECT_CANNOT_EP 187
#define EFFECT_SKIP_TURN 188 #define EFFECT_SKIP_TURN 188
#define EFFECT_SKIP_EP 189
#define EFFECT_DEFENSE_ATTACK 190 #define EFFECT_DEFENSE_ATTACK 190
#define EFFECT_MUST_ATTACK 191 #define EFFECT_MUST_ATTACK 191
#define EFFECT_FIRST_ATTACK 192 #define EFFECT_FIRST_ATTACK 192
......
...@@ -1986,6 +1986,8 @@ int32 scriptlib::duel_skip_phase(lua_State *L) { ...@@ -1986,6 +1986,8 @@ int32 scriptlib::duel_skip_phase(lua_State *L) {
code = EFFECT_SKIP_BP; code = EFFECT_SKIP_BP;
else if(phase == PHASE_MAIN2) else if(phase == PHASE_MAIN2)
code = EFFECT_SKIP_M2; code = EFFECT_SKIP_M2;
else if(phase == PHASE_END)
code = EFFECT_SKIP_EP;
else else
return 0; return 0;
effect* peffect = pduel->new_effect(); effect* peffect = pduel->new_effect();
......
...@@ -1366,7 +1366,9 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1366,7 +1366,9 @@ int32 field::process_phase_event(int16 step, int32 phase) {
case 0: { case 0: {
if((phase == PHASE_DRAW && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_DP)) if((phase == PHASE_DRAW && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_DP))
|| (phase == PHASE_STANDBY && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_SP)) || (phase == PHASE_STANDBY && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_SP))
|| (phase == PHASE_BATTLE_START && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP))) { || (phase == PHASE_BATTLE_START && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP))
|| (phase == PHASE_BATTLE && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP))
|| (phase == PHASE_END && is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_EP))) {
core.units.begin()->step = 24; core.units.begin()->step = 24;
return FALSE; return FALSE;
} }
...@@ -4198,6 +4200,12 @@ int32 field::process_turn(uint16 step, uint8 turn_player) { ...@@ -4198,6 +4200,12 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
//End Phase //End Phase
infos.phase = PHASE_END; infos.phase = PHASE_END;
core.phase_action = FALSE; core.phase_action = FALSE;
if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_EP)) {
core.units.begin()->step = 17;
reset_phase(PHASE_END);
adjust_all();
return FALSE;
}
pduel->write_buffer8(MSG_NEW_PHASE); pduel->write_buffer8(MSG_NEW_PHASE);
pduel->write_buffer16(infos.phase); pduel->write_buffer16(infos.phase);
raise_event((card*)0, EVENT_PHASE_START + PHASE_END, 0, 0, 0, turn_player, 0); raise_event((card*)0, EVENT_PHASE_START + PHASE_END, 0, 0, 0, turn_player, 0);
......
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