Commit 2881e91f authored by LordOfNightmares's avatar LordOfNightmares Committed by GitHub

Added EFFECT_FLAG2_ACTIVATE_MONSTER_SZONE (#8)

`EFFECT_FLAG2_ACTIVATE_MONSTER_SZONE` flag to activate monsters in spell zones
parent 989fc0c6
...@@ -253,7 +253,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con ...@@ -253,7 +253,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if(!(handler->data.type & (TYPE_FIELD | TYPE_PENDULUM)) && is_flag(EFFECT_FLAG_LIMIT_ZONE) && !(zone & (1u << handler->current.sequence))) if(!(handler->data.type & (TYPE_FIELD | TYPE_PENDULUM)) && is_flag(EFFECT_FLAG_LIMIT_ZONE) && !(zone & (1u << handler->current.sequence)))
return FALSE; return FALSE;
} else { } else {
if(handler->data.type & TYPE_MONSTER) { if((handler->data.type & TYPE_MONSTER) && !is_flag(EFFECT_FLAG2_ACTIVATE_MONSTER_SZONE)) {
if(!(handler->data.type & TYPE_PENDULUM)) if(!(handler->data.type & TYPE_PENDULUM))
return FALSE; return FALSE;
if(!pduel->game_field->is_location_useable(playerid, LOCATION_PZONE, 0) if(!pduel->game_field->is_location_useable(playerid, LOCATION_PZONE, 0)
......
...@@ -224,6 +224,7 @@ enum effect_flag2 : uint32 { ...@@ -224,6 +224,7 @@ enum effect_flag2 : uint32 {
EFFECT_FLAG2_OPTION = 0x0008, EFFECT_FLAG2_OPTION = 0x0008,
EFFECT_FLAG2_SPOSITCH = 0x0100, // flag2 from 0x0100 are koishipro use EFFECT_FLAG2_SPOSITCH = 0x0100, // flag2 from 0x0100 are koishipro use
EFFECT_FLAG2_AVAILABLE_BD = 0x0200, EFFECT_FLAG2_AVAILABLE_BD = 0x0200,
EFFECT_FLAG2_ACTIVATE_MONSTER_SZONE = 0x0400,
}; };
inline effect_flag operator|(effect_flag flag1, effect_flag flag2) inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
{ {
......
...@@ -92,6 +92,8 @@ interpreter::interpreter(duel* pd): coroutines(256) { ...@@ -92,6 +92,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal(lua_state, "EFFECT_FLAG2_SPOSITCH"); lua_setglobal(lua_state, "EFFECT_FLAG2_SPOSITCH");
lua_pushinteger(lua_state, EFFECT_FLAG2_AVAILABLE_BD); lua_pushinteger(lua_state, EFFECT_FLAG2_AVAILABLE_BD);
lua_setglobal(lua_state, "EFFECT_FLAG2_AVAILABLE_BD"); lua_setglobal(lua_state, "EFFECT_FLAG2_AVAILABLE_BD");
lua_pushinteger(lua_state, EFFECT_FLAG2_ACTIVATE_MONSTER_SZONE);
lua_setglobal(lua_state, "EFFECT_FLAG2_ACTIVATE_MONSTER_SZONE");
//effects //effects
lua_pushinteger(lua_state, EFFECT_CHANGE_LINK_MARKER_KOISHI); lua_pushinteger(lua_state, EFFECT_CHANGE_LINK_MARKER_KOISHI);
lua_setglobal(lua_state, "EFFECT_CHANGE_LINK_MARKER_KOISHI"); lua_setglobal(lua_state, "EFFECT_CHANGE_LINK_MARKER_KOISHI");
......
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