Commit b2ef8f9b authored by salix5's avatar salix5

Merge branch 'master' into patch-hat

parents 265ff503 3bdea07d
...@@ -94,7 +94,7 @@ public: ...@@ -94,7 +94,7 @@ public:
query_cache q_cache; query_cache q_cache;
uint8 owner; uint8 owner;
uint8 summon_player; uint8 summon_player;
uint32 summon_type; uint32 summon_info;
uint32 status; uint32 status;
uint32 operation_param; uint32 operation_param;
uint8 announce_count; uint8 announce_count;
......
...@@ -199,10 +199,6 @@ struct processor { ...@@ -199,10 +199,6 @@ struct processor {
card_set discarded_set; card_set discarded_set;
card_set destroy_canceled; card_set destroy_canceled;
card_set delayed_enable_set; card_set delayed_enable_set;
card_set summoned_cards_pt[2];
card_set normalsummoned_cards_pt[2];
card_set spsummoned_cards_pt[2];
card_set flipsummoned_cards_pt[2];
effect_set_v disfield_effects; effect_set_v disfield_effects;
effect_set_v extraz_effects; effect_set_v extraz_effects;
effect_set_v extraz_effects_e; effect_set_v extraz_effects_e;
...@@ -266,13 +262,18 @@ struct processor { ...@@ -266,13 +262,18 @@ struct processor {
uint8 remove_brainwashing; uint8 remove_brainwashing;
uint8 flip_delayed; uint8 flip_delayed;
uint8 damage_calculated; uint8 damage_calculated;
uint8 summon_state[2]; uint8 summon_state_count[2];
uint8 normalsummon_state[2]; uint8 normalsummon_state_count[2];
uint8 flipsummon_state[2]; uint8 flipsummon_state_count[2];
uint8 spsummon_state[2]; uint8 spsummon_state_count[2];
uint8 attack_state[2]; uint8 attack_state_count[2];
uint8 phase_action; uint8 phase_action;
uint32 hint_timing[2]; uint32 hint_timing[2];
std::unordered_map<uint32, std::pair<uint32, uint32> > summon_counter;
std::unordered_map<uint32, std::pair<uint32, uint32> > normalsummon_counter;
std::unordered_map<uint32, std::pair<uint32, uint32> > spsummon_counter;
std::unordered_map<uint32, std::pair<uint32, uint32> > flipsummon_counter;
std::unordered_map<uint32, std::pair<uint32, uint32> > attack_counter;
}; };
class field { class field {
public: public:
......
...@@ -63,6 +63,7 @@ static const struct luaL_Reg cardlib[] = { ...@@ -63,6 +63,7 @@ static const struct luaL_Reg cardlib[] = {
{ "GetSequence", scriptlib::card_get_sequence }, { "GetSequence", scriptlib::card_get_sequence },
{ "GetPreviousSequence", scriptlib::card_get_previous_sequence }, { "GetPreviousSequence", scriptlib::card_get_previous_sequence },
{ "GetSummonType", scriptlib::card_get_summon_type }, { "GetSummonType", scriptlib::card_get_summon_type },
{ "GetSummonLocation", scriptlib::card_get_summon_location },
{ "GetSummonPlayer", scriptlib::card_get_summon_player }, { "GetSummonPlayer", scriptlib::card_get_summon_player },
{ "GetDestination", scriptlib::card_get_destination }, { "GetDestination", scriptlib::card_get_destination },
{ "GetLeaveFieldDest", scriptlib::card_get_leave_field_dest }, { "GetLeaveFieldDest", scriptlib::card_get_leave_field_dest },
...@@ -476,16 +477,10 @@ static const struct luaL_Reg duellib[] = { ...@@ -476,16 +477,10 @@ static const struct luaL_Reg duellib[] = {
{ "IsChainDisablable", scriptlib::duel_is_chain_disablable }, { "IsChainDisablable", scriptlib::duel_is_chain_disablable },
{ "CheckChainTarget", scriptlib::duel_check_chain_target }, { "CheckChainTarget", scriptlib::duel_check_chain_target },
{ "CheckChainUniqueness", scriptlib::duel_check_chain_uniqueness }, { "CheckChainUniqueness", scriptlib::duel_check_chain_uniqueness },
{ "CheckSummonActivity", scriptlib::duel_check_summon_activity }, { "GetActivityCount", scriptlib::duel_get_activity_count },
{ "CheckNormalSummonActivity", scriptlib::duel_check_normal_summon_activity },
{ "CheckFlipSummonActivity", scriptlib::duel_check_flip_summon_activity },
{ "CheckSpecialSummonActivity", scriptlib::duel_check_special_summon_activity },
{ "CheckAttackActivity", scriptlib::duel_check_attack_activity },
{ "CheckPhaseActivity", scriptlib::duel_check_phase_activity }, { "CheckPhaseActivity", scriptlib::duel_check_phase_activity },
{ "SummonedCardsThisTurn", scriptlib::duel_get_summoned_cards_this_turn }, { "AddCustomActivityCounter", scriptlib::duel_add_custom_activity_counter },
{ "NormalSummonedCardsThisTurn", scriptlib::duel_get_normal_summoned_cards_this_turn }, { "GetCustomActivityCount", scriptlib::duel_get_custom_activity_count },
{ "SpecialSummonedCardsThisTurn", scriptlib::duel_get_spsummoned_cards_this_turn },
{ "FlipSummonedCardsThisTurn", scriptlib::duel_get_flip_summoned_cards_this_turn },
{ "VenomSwampCheck", scriptlib::duel_venom_swamp_check }, { "VenomSwampCheck", scriptlib::duel_venom_swamp_check },
{ "SwapDeckAndGrave", scriptlib::duel_swap_deck_and_grave }, { "SwapDeckAndGrave", scriptlib::duel_swap_deck_and_grave },
{ "MajesticCopy", scriptlib::duel_majestic_copy }, { "MajesticCopy", scriptlib::duel_majestic_copy },
......
...@@ -378,7 +378,14 @@ int32 scriptlib::card_get_summon_type(lua_State *L) { ...@@ -378,7 +378,14 @@ int32 scriptlib::card_get_summon_type(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1); card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, pcard->summon_type); lua_pushinteger(L, pcard->summon_info & 0xff00ffff);
return 1;
}
int32 scriptlib::card_get_summon_location(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
lua_pushinteger(L, (pcard->summon_info >> 16) & 0xff);
return 1; return 1;
} }
int32 scriptlib::card_get_summon_player(lua_State *L) { int32 scriptlib::card_get_summon_player(lua_State *L) {
......
...@@ -3024,8 +3024,7 @@ int32 scriptlib::duel_check_chain_uniqueness(lua_State *L) { ...@@ -3024,8 +3024,7 @@ int32 scriptlib::duel_check_chain_uniqueness(lua_State *L) {
return 1; return 1;
} }
std::set<uint32> er; std::set<uint32> er;
field::chain_array::iterator cait; for(auto cait = pduel->game_field->core.current_chain.begin(); cait != pduel->game_field->core.current_chain.end(); ++cait)
for(cait = pduel->game_field->core.current_chain.begin(); cait != pduel->game_field->core.current_chain.end(); ++cait)
er.insert(cait->triggering_effect->handler->get_code()); er.insert(cait->triggering_effect->handler->get_code());
if(er.size() == pduel->game_field->core.current_chain.size()) if(er.size() == pduel->game_field->core.current_chain.size())
lua_pushboolean(L, 1); lua_pushboolean(L, 1);
...@@ -3033,49 +3032,33 @@ int32 scriptlib::duel_check_chain_uniqueness(lua_State *L) { ...@@ -3033,49 +3032,33 @@ int32 scriptlib::duel_check_chain_uniqueness(lua_State *L) {
lua_pushboolean(L, 0); lua_pushboolean(L, 0);
return 1; return 1;
} }
int32 scriptlib::duel_check_summon_activity(lua_State *L) { int32 scriptlib::duel_get_activity_count(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 2);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->core.summon_state[playerid]);
return 1;
}
int32 scriptlib::duel_check_normal_summon_activity(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->core.normalsummon_state[playerid]);
return 1;
}
int32 scriptlib::duel_check_flip_summon_activity(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->core.flipsummon_state[playerid]);
return 1;
}
int32 scriptlib::duel_check_special_summon_activity(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->core.spsummon_state[playerid]);
return 1;
}
int32 scriptlib::duel_check_attack_activity(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1); int32 playerid = lua_tointeger(L, 1);
int32 activity_type = lua_tointeger(L, 2);
if(playerid != 0 && playerid != 1) if(playerid != 0 && playerid != 1)
return 0; return 0;
duel* pduel = interpreter::get_duel_info(L); duel* pduel = interpreter::get_duel_info(L);
lua_pushboolean(L, pduel->game_field->core.attack_state[playerid]); switch(activity_type) {
case 1:
lua_pushinteger(L, pduel->game_field->core.summon_state_count[playerid]);
break;
case 2:
lua_pushinteger(L, pduel->game_field->core.normalsummon_state_count[playerid]);
break;
case 3:
lua_pushinteger(L, pduel->game_field->core.flipsummon_state_count[playerid]);
break;
case 4:
lua_pushinteger(L, pduel->game_field->core.spsummon_state_count[playerid]);
break;
case 5:
lua_pushinteger(L, pduel->game_field->core.attack_state_count[playerid]);
break;
default:
lua_pushinteger(L, 0);
break;
}
return 1; return 1;
} }
int32 scriptlib::duel_check_phase_activity(lua_State *L) { int32 scriptlib::duel_check_phase_activity(lua_State *L) {
...@@ -3083,49 +3066,50 @@ int32 scriptlib::duel_check_phase_activity(lua_State *L) { ...@@ -3083,49 +3066,50 @@ int32 scriptlib::duel_check_phase_activity(lua_State *L) {
lua_pushboolean(L, pduel->game_field->core.phase_action); lua_pushboolean(L, pduel->game_field->core.phase_action);
return 1; return 1;
} }
int32 scriptlib::duel_get_summoned_cards_this_turn(lua_State *L) { int32 scriptlib::duel_add_custom_activity_counter(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 3);
int32 playerid = lua_tointeger(L, 1); check_param(L, PARAM_TYPE_FUNCTION, 3);
if(playerid != 0 && playerid != 1) int32 counter_id = lua_tointeger(L, 1);
return 0; int32 activity_type = lua_tointeger(L, 2);
duel* pduel = interpreter::get_duel_info(L); int32 counter_filter = interpreter::get_function_handle(L, 3);
group* newgroup = pduel->new_group();
newgroup->container = pduel->game_field->core.summoned_cards_pt[playerid];
interpreter::group2value(L, newgroup);
return 1;
}
int32 scriptlib::duel_get_normal_summoned_cards_this_turn(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group();
newgroup->container = pduel->game_field->core.normalsummoned_cards_pt[playerid];
interpreter::group2value(L, newgroup);
return 1;
}
int32 scriptlib::duel_get_spsummoned_cards_this_turn(lua_State *L) {
check_param_count(L, 1);
int32 playerid = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1)
return 0;
duel* pduel = interpreter::get_duel_info(L); duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group(); switch(activity_type) {
newgroup->container = pduel->game_field->core.spsummoned_cards_pt[playerid]; case 1:
interpreter::group2value(L, newgroup); break;
return 1; case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
default:
break;
}
return 0;
} }
int32 scriptlib::duel_get_flip_summoned_cards_this_turn(lua_State *L) { int32 scriptlib::duel_get_custom_activity_count(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 3);
int32 playerid = lua_tointeger(L, 1); int32 counter_id = lua_tointeger(L, 1);
if(playerid != 0 && playerid != 1) int32 playerid = lua_tointeger(L, 2);
return 0; int32 activity_type = lua_tointeger(L, 3);
duel* pduel = interpreter::get_duel_info(L); duel* pduel = interpreter::get_duel_info(L);
group* newgroup = pduel->new_group(); switch(activity_type) {
newgroup->container = pduel->game_field->core.flipsummoned_cards_pt[playerid]; case 1:
interpreter::group2value(L, newgroup); break;
return 1; case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
default:
break;
}
return 0;
} }
int32 scriptlib::duel_venom_swamp_check(lua_State *L) { int32 scriptlib::duel_venom_swamp_check(lua_State *L) {
check_param_count(L, 2); check_param_count(L, 2);
......
This diff is collapsed.
...@@ -3034,7 +3034,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3034,7 +3034,7 @@ int32 field::process_battle_command(uint16 step) {
core.attack_cancelable = TRUE; core.attack_cancelable = TRUE;
core.sub_attacker = 0; core.sub_attacker = 0;
core.sub_attack_target = (card*)0xffffffff; core.sub_attack_target = (card*)0xffffffff;
core.attack_state[infos.turn_player] = TRUE; core.attack_state_count[infos.turn_player]++;
pduel->write_buffer8(MSG_ATTACK); pduel->write_buffer8(MSG_ATTACK);
pduel->write_buffer32(core.attacker->get_info_location()); pduel->write_buffer32(core.attacker->get_info_location());
if(core.attack_target) { if(core.attack_target) {
...@@ -3989,15 +3989,11 @@ int32 field::process_turn(uint16 step, uint8 turn_player) { ...@@ -3989,15 +3989,11 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
continue; continue;
pcard->set_status(STATUS_SET_TURN, FALSE); pcard->set_status(STATUS_SET_TURN, FALSE);
} }
core.summon_state[p] = 0; core.summon_state_count[p] = 0;
core.normalsummon_state[p] = 0; core.normalsummon_state_count[p] = 0;
core.flipsummon_state[p] = 0; core.flipsummon_state_count[p] = 0;
core.spsummon_state[p] = 0; core.spsummon_state_count[p] = 0;
core.summoned_cards_pt[p].clear(); core.attack_state_count[p] = 0;
core.normalsummoned_cards_pt[p].clear();
core.spsummoned_cards_pt[p].clear();
core.flipsummoned_cards_pt[p].clear();
core.attack_state[p] = 0;
core.summon_count[p] = 0; core.summon_count[p] = 0;
core.extra_summon[p] = 0; core.extra_summon[p] = 0;
} }
...@@ -4354,6 +4350,8 @@ int32 field::add_chain(uint16 step) { ...@@ -4354,6 +4350,8 @@ int32 field::add_chain(uint16 step) {
peffect->handler->set_status(STATUS_LEAVE_CONFIRMED, TRUE); peffect->handler->set_status(STATUS_LEAVE_CONFIRMED, TRUE);
} }
core.phase_action = TRUE; core.phase_action = TRUE;
if(clit->opinfos.count(0x200))
core.spsummon_state_count[clit->triggering_player]++;
pduel->write_buffer8(MSG_CHAINED); pduel->write_buffer8(MSG_CHAINED);
pduel->write_buffer8(clit->chain_count); pduel->write_buffer8(clit->chain_count);
raise_event(peffect->handler, EVENT_CHAINING, peffect, 0, clit->triggering_player, clit->triggering_player, clit->chain_count); raise_event(peffect->handler, EVENT_CHAINING, peffect, 0, clit->triggering_player, clit->triggering_player, clit->chain_count);
...@@ -4487,6 +4485,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) { ...@@ -4487,6 +4485,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
raise_event((card*)0, EVENT_CHAIN_NEGATED, peffect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count); raise_event((card*)0, EVENT_CHAIN_NEGATED, peffect, 0, cait->triggering_player, cait->triggering_player, cait->chain_count);
process_instant_event(); process_instant_event();
core.units.begin()->step = 9; core.units.begin()->step = 9;
if(cait->opinfos.count(0x200))
core.spsummon_state_count[cait->triggering_player]--;
return FALSE; return FALSE;
} }
for(auto oeit = effects.oath.begin(); oeit != effects.oath.end(); ++oeit) for(auto oeit = effects.oath.begin(); oeit != effects.oath.end(); ++oeit)
...@@ -4494,8 +4494,6 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) { ...@@ -4494,8 +4494,6 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
oeit->second = 0; oeit->second = 0;
break_effect(); break_effect();
core.chain_solving = TRUE; core.chain_solving = TRUE;
if(cait->opinfos.count(0x200))
core.spsummon_state[cait->triggering_player] = TRUE;
card* pcard = peffect->handler; card* pcard = peffect->handler;
if((peffect->type & EFFECT_TYPE_ACTIVATE) && pcard->is_has_relation(peffect)) { if((peffect->type & EFFECT_TYPE_ACTIVATE) && pcard->is_has_relation(peffect)) {
pcard->set_status(STATUS_ACTIVATED, TRUE); pcard->set_status(STATUS_ACTIVATED, TRUE);
...@@ -4528,6 +4526,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) { ...@@ -4528,6 +4526,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
return FALSE; return FALSE;
} }
} }
if(cait->opinfos.count(0x200))
core.spsummon_state_count[cait->triggering_player]--;
core.units.begin()->peffect = (effect*)(size_t)cait->triggering_effect->operation; core.units.begin()->peffect = (effect*)(size_t)cait->triggering_effect->operation;
if(cait->replace_op) if(cait->replace_op)
cait->triggering_effect->operation = cait->replace_op; cait->triggering_effect->operation = cait->replace_op;
......
...@@ -65,6 +65,7 @@ public: ...@@ -65,6 +65,7 @@ public:
static int32 card_get_sequence(lua_State *L); static int32 card_get_sequence(lua_State *L);
static int32 card_get_previous_sequence(lua_State *L); static int32 card_get_previous_sequence(lua_State *L);
static int32 card_get_summon_type(lua_State *L); static int32 card_get_summon_type(lua_State *L);
static int32 card_get_summon_location(lua_State *L);
static int32 card_get_summon_player(lua_State *L); static int32 card_get_summon_player(lua_State *L);
static int32 card_get_destination(lua_State *L); static int32 card_get_destination(lua_State *L);
static int32 card_get_leave_field_dest(lua_State *L); static int32 card_get_leave_field_dest(lua_State *L);
...@@ -476,16 +477,10 @@ public: ...@@ -476,16 +477,10 @@ public:
static int32 duel_is_chain_disablable(lua_State *L); static int32 duel_is_chain_disablable(lua_State *L);
static int32 duel_check_chain_target(lua_State *L); static int32 duel_check_chain_target(lua_State *L);
static int32 duel_check_chain_uniqueness(lua_State *L); static int32 duel_check_chain_uniqueness(lua_State *L);
static int32 duel_check_summon_activity(lua_State *L); static int32 duel_get_activity_count(lua_State *L);
static int32 duel_check_normal_summon_activity(lua_State *L);
static int32 duel_check_flip_summon_activity(lua_State *L);
static int32 duel_check_special_summon_activity(lua_State *L);
static int32 duel_check_attack_activity(lua_State *L);
static int32 duel_check_phase_activity(lua_State *L); static int32 duel_check_phase_activity(lua_State *L);
static int32 duel_get_summoned_cards_this_turn(lua_State *L); static int32 duel_add_custom_activity_counter(lua_State *L);
static int32 duel_get_normal_summoned_cards_this_turn(lua_State *L); static int32 duel_get_custom_activity_count(lua_State *L);
static int32 duel_get_spsummoned_cards_this_turn(lua_State *L);
static int32 duel_get_flip_summoned_cards_this_turn(lua_State *L);
//specific card functions //specific card functions
static int32 duel_venom_swamp_check(lua_State *L); static int32 duel_venom_swamp_check(lua_State *L);
......
...@@ -57,7 +57,7 @@ function c102380.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c102380.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
function c102380.spcost(e,c,tp) function c102380.spcost(e,c,tp)
return not Duel.CheckNormalSummonActivity(tp) return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end end
function c102380.spcop(e,tp,eg,ep,ev,re,r,rp) function c102380.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -11,7 +11,7 @@ function c1036974.initial_effect(c) ...@@ -11,7 +11,7 @@ function c1036974.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c1036974.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c1036974.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
......
...@@ -19,7 +19,7 @@ function c11373345.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c11373345.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11373345.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c11373345.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c11373345.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c11373345.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
...@@ -18,7 +18,7 @@ function c12836042.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c12836042.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c12836042.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c12836042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1
and not Duel.CheckSpecialSummonActivity(tp) and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsReleasable() end and e:GetHandler():IsReleasable() end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -28,7 +28,7 @@ function c21420702.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function c21420702.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c21420702.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c21420702.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
...@@ -33,8 +33,9 @@ function c25920413.spfilter(c) ...@@ -33,8 +33,9 @@ function c25920413.spfilter(c)
end end
function c25920413.spcon(e,c) function c25920413.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return not Duel.CheckNormalSummonActivity(c:GetControler()) local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c25920413.spfilter,c:GetControler(),0,LOCATION_MZONE,1,nil) return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
and Duel.IsExistingMatchingCard(c25920413.spfilter,tp,0,LOCATION_MZONE,1,nil)
end end
function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c) function c25920413.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
--星屑の残光
function c27196937.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c27196937.target)
e1:SetOperation(c27196937.activate)
c:RegisterEffect(e1)
end
function c27196937.filter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27196937.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c27196937.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c27196937.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c27196937.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c27196937.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -71,7 +71,8 @@ function c30398342.filter(c,e,tp) ...@@ -71,7 +71,8 @@ function c30398342.filter(c,e,tp)
return c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c30398342.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c30398342.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -19,7 +19,7 @@ function c33302407.initial_effect(c) ...@@ -19,7 +19,7 @@ function c33302407.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33302407.discon(e,tp,eg,ep,ev,re,r,rp) function c33302407.discon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.CheckAttackActivity(tp) return tp==Duel.GetTurnPlayer() and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0
end end
function c33302407.filter(c) function c33302407.filter(c)
return c:IsFaceup() and c:IsSetCard(0x25) return c:IsFaceup() and c:IsSetCard(0x25)
......
--업화의 중기사
function c34761062.initial_effect(c)
aux.EnableDualAttribute(c)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(34761062,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START)
e4:SetCondition(c34761062.descon)
e4:SetTarget(c34761062.destg)
e4:SetOperation(c34761062.desop)
c:RegisterEffect(e4)
end
function c34761062.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsDualState() and Duel.GetAttacker()==c
and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and bc:IsAbleToRemove()
end
function c34761062.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler():GetBattleTarget(),1,0,0)
end
function c34761062.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
...@@ -16,7 +16,7 @@ function c34838437.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c34838437.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end end
function c34838437.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c34838437.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
--외신 아자토트
function c34945480.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,5),3,c34945480.ovfilter,aux.Stringid(34945480,1))
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c34945480.sumcon)
e2:SetOperation(c34945480.sumsuc)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(34945480,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c34945480.condition)
e3:SetCost(c34945480.cost)
e3:SetTarget(c34945480.target)
e3:SetOperation(c34945480.operation)
c:RegisterEffect(e3)
end
function c34945480.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb6) and c:IsType(TYPE_XYZ)
end
function c34945480.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c34945480.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c34945480.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c34945480.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c34945480.condition(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetOverlayGroup()
return g:IsExists(Card.IsType,1,nil,TYPE_FUSION) and g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
and g:IsExists(Card.IsType,1,nil,TYPE_XYZ)
end
function c34945480.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c34945480.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c34945480.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
...@@ -10,7 +10,7 @@ function c39980304.initial_effect(c) ...@@ -10,7 +10,7 @@ function c39980304.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c39980304.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c39980304.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
......
...@@ -18,7 +18,7 @@ function c41613948.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function c41613948.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end end
function c41613948.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c41613948.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
...@@ -16,7 +16,7 @@ function c4168871.filter(c) ...@@ -16,7 +16,7 @@ function c4168871.filter(c)
return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c4168871.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c4168871.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(c4168871.filter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c4168871.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c4168871.filter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c4168871.filter,tp,LOCATION_HAND,0,1,1,nil)
......
...@@ -36,7 +36,7 @@ function c43378076.cfilter(c) ...@@ -36,7 +36,7 @@ function c43378076.cfilter(c)
return c:IsType(TYPE_SPIRIT) and c:GetCode()~=43378076 and not c:IsPublic() return c:IsType(TYPE_SPIRIT) and c:GetCode()~=43378076 and not c:IsPublic()
end end
function c43378076.sretcost(e,tp,eg,ep,ev,re,r,rp,chk) function c43378076.sretcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(c43378076.cfilter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c43378076.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c43378076.cfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c43378076.cfilter,tp,LOCATION_HAND,0,1,1,nil)
......
...@@ -16,7 +16,7 @@ function c44028461.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c44028461.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c44028461.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c44028461.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
--oath effects --oath effects
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -27,7 +27,7 @@ function c44887817.initial_effect(c) ...@@ -27,7 +27,7 @@ function c44887817.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c44887817.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c44887817.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
end end
function c44887817.filter(c,e,tp) function c44887817.filter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -31,7 +31,7 @@ function c45812361.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c45812361.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(45812361)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN1 return e:GetHandler():GetFlagEffect(45812361)~=0 and Duel.GetCurrentPhase()==PHASE_MAIN1
end end
function c45812361.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c45812361.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and e:GetHandler():IsReleasable() end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
--oath effects --oath effects
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -66,7 +66,7 @@ function c45950291.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c45950291.thcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetDrawCount(tp)>0 and Duel.GetDrawCount(tp)>0
end end
function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c45950291.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -12,8 +12,8 @@ function c46173679.initial_effect(c) ...@@ -12,8 +12,8 @@ function c46173679.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46173679.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c46173679.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -13,7 +13,7 @@ function c48049769.initial_effect(c) ...@@ -13,7 +13,7 @@ function c48049769.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c48049769.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c48049769.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and e:GetHandler():IsDiscardable() end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
--oath effects --oath effects
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -13,8 +13,8 @@ end ...@@ -13,8 +13,8 @@ end
function c49033797.cfilter(c,tpe) function c49033797.cfilter(c,tpe)
return c:IsFaceup() and c:IsType(tpe) return c:IsFaceup() and c:IsType(tpe)
end end
function c49033797.filter(c,e,tp,code) function c49033797.filter(c,e,tp,cat)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(cat) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk) function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -25,11 +25,11 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,11 +25,11 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_XYZ) then flag=flag+4 end if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_XYZ) then flag=flag+4 end
e:SetLabel(flag) e:SetLabel(flag)
if flag==3 then if flag==3 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,8809344) return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb6)
elseif flag==6 then elseif flag==6 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,17412721) return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb7)
elseif flag==5 then elseif flag==5 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,12948099) return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb8)
else return false end else return false end
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -39,7 +39,7 @@ function c49033797.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c49033797.activate(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel() local flag=e:GetLabel()
if flag==3 then if flag==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,8809344) local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb6)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
...@@ -51,13 +51,13 @@ function c49033797.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,13 +51,13 @@ function c49033797.activate(e,tp,eg,ep,ev,re,r,rp)
end end
elseif flag==6 then elseif flag==6 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,17412721) local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb7)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,12948099) local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb8)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -11,7 +11,7 @@ function c52105192.initial_effect(c) ...@@ -11,7 +11,7 @@ function c52105192.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c52105192.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c52105192.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) and Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.DiscardDeck(tp,1,REASON_COST) Duel.DiscardDeck(tp,1,REASON_COST)
--oath effects --oath effects
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -11,7 +11,7 @@ function c54283059.initial_effect(c) ...@@ -11,7 +11,7 @@ function c54283059.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c54283059.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c54283059.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -11,7 +11,7 @@ function c54977057.initial_effect(c) ...@@ -11,7 +11,7 @@ function c54977057.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c54977057.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c54977057.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and Duel.GetCurrentPhase()~=PHASE_MAIN2 end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCurrentPhase()~=PHASE_MAIN2 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -14,8 +14,8 @@ function c57274196.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,8 +14,8 @@ function c57274196.condition(e,tp,eg,ep,ev,re,r,rp)
return tc:IsControler(tp) and tc:IsRace(RACE_SPELLCASTER) and tc:IsChainAttackable() return tc:IsControler(tp) and tc:IsRace(RACE_SPELLCASTER) and tc:IsChainAttackable()
end end
function c57274196.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c57274196.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -16,7 +16,7 @@ function c59708927.filter(c,e,tp) ...@@ -16,7 +16,7 @@ function c59708927.filter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c59708927.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c59708927.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckNormalSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetCode(EFFECT_CANNOT_SUMMON)
......
--펜듈럼 모라토리엄
function c60434189.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c60434189.activate)
c:RegisterEffect(e1)
end
function c60434189.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c60434189.indtg)
e1:SetValue(c60434189.indval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c60434189.discon)
e2:SetOperation(c60434189.disop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c60434189.indtg(e,c)
return c:GetSequence()>5
end
function c60434189.indval(e,re,tp)
return tp~=e:GetHandlerPlayer()
end
function c60434189.indfilter(c)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()>5
end
function c60434189.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c60434189.indfilter,1,nil) and ep~=tp
end
function c60434189.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
...@@ -11,8 +11,8 @@ function c60764581.initial_effect(c) ...@@ -11,8 +11,8 @@ function c60764581.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c60764581.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60764581.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
--BOX복서
function c61156777.initial_effect(c)
--Add counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61156777,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c61156777.ctcon)
e1:SetOperation(c61156777.ctop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(61156777,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c61156777.spcost)
e2:SetTarget(c61156777.sptg)
e2:SetOperation(c61156777.spop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(c61156777.reptg)
e3:SetOperation(c61156777.repop)
c:RegisterEffect(e3)
end
function c61156777.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c61156777.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:AddCounter(0x34,1)
end
end
function c61156777.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x34)>1 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c61156777.filter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c61156777.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c61156777.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c61156777.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c61156777.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c61156777.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then e:GetHandler():IsCanRemoveCounter(tp,0x34,1,REASON_EFFECT) end
return Duel.SelectYesNo(tp,aux.Stringid(61156777,2))
end
function c61156777.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x34,1,REASON_EFFECT)
end
...@@ -78,7 +78,7 @@ function c63014935.phop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c63014935.phop(e,tp,eg,ep,ev,re,r,rp)
else Duel.Damage(tp,1000,REASON_EFFECT) end else Duel.Damage(tp,1000,REASON_EFFECT) end
end end
function c63014935.spcost(e,c,tp) function c63014935.spcost(e,c,tp)
return not Duel.CheckNormalSummonActivity(tp) return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end end
function c63014935.spcop(e,tp,eg,ep,ev,re,r,rp) function c63014935.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--極星邪竜ヨルムンガンド
function c64203620.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64203620,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENCE,1)
e1:SetCondition(c64203620.spcon)
c:RegisterEffect(e1)
--self destory
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c64203620.descon)
c:RegisterEffect(e4)
--damage
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(64203620,1))
e5:SetCategory(CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetCode(EVENT_CHANGE_POS)
e5:SetCountLimit(1)
e5:SetCondition(c64203620.damcon)
e5:SetTarget(c64203620.damtg)
e5:SetOperation(c64203620.damop)
c:RegisterEffect(e5)
end
function c64203620.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c64203620.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c64203620.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4b)
end
function c64203620.descon(e)
return not Duel.IsExistingMatchingCard(c64203620.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c64203620.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) and e:GetHandler():IsPreviousPosition(POS_FACEUP_ATTACK)
end
function c64203620.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000)
end
function c64203620.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
...@@ -37,7 +37,7 @@ function c66947414.initial_effect(c) ...@@ -37,7 +37,7 @@ function c66947414.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c66947414.condition(e,tp,eg,ep,ev,re,r,rp) function c66947414.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.CheckNormalSummonActivity(tp) return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end end
function c66947414.chkfilter(c,tp) function c66947414.chkfilter(c,tp)
return c:IsSetCard(0x15) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:IsSetCard(0x15) and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
......
...@@ -15,7 +15,7 @@ function c67300516.initial_effect(c) ...@@ -15,7 +15,7 @@ function c67300516.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c67300516.spcon(e,tp,eg,ep,ev,re,r,rp) function c67300516.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and not Duel.CheckNormalSummonActivity(tp) return Duel.GetTurnPlayer()==tp and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end end
function c67300516.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c67300516.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
...@@ -12,7 +12,7 @@ function c68815401.initial_effect(c) ...@@ -12,7 +12,7 @@ function c68815401.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c68815401.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c68815401.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) and not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.CheckLPCost(tp,500) and Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -18,7 +18,7 @@ function c69537999.initial_effect(c) ...@@ -18,7 +18,7 @@ function c69537999.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c69537999.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c69537999.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
...@@ -12,7 +12,7 @@ function c70406920.initial_effect(c) ...@@ -12,7 +12,7 @@ function c70406920.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c70406920.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c70406920.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -13,7 +13,7 @@ function c73199638.initial_effect(c) ...@@ -13,7 +13,7 @@ function c73199638.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73199638.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c73199638.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -12,8 +12,8 @@ function c73915051.initial_effect(c) ...@@ -12,8 +12,8 @@ function c73915051.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73915051.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c73915051.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
--가부키 드래곤
function c7541475.initial_effect(c)
--position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7541475,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c7541475.postg)
e1:SetOperation(c7541475.posop)
c:RegisterEffect(e1)
end
function c7541475.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local d=Duel.GetAttackTarget()
if chk==0 then return d end
Duel.SetOperationInfo(0,CATEGORY_POSITION,d,1,0,0)
end
function c7541475.posop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:IsRelateToBattle() then
Duel.ChangePosition(d,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
...@@ -35,7 +35,7 @@ function c75732622.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -35,7 +35,7 @@ function c75732622.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
function c75732622.spcost(e,c,tp) function c75732622.spcost(e,c,tp)
return not Duel.CheckNormalSummonActivity(tp) return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end end
function c75732622.spcop(e,tp,eg,ep,ev,re,r,rp) function c75732622.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -28,7 +28,7 @@ function c86889202.cfilter(c) ...@@ -28,7 +28,7 @@ function c86889202.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end end
function c86889202.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c86889202.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.IsExistingMatchingCard(c86889202.cfilter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c86889202.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c86889202.cfilter,1,1,REASON_COST) Duel.DiscardHand(tp,c86889202.cfilter,1,1,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -19,8 +19,8 @@ function c87614611.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,8 +19,8 @@ function c87614611.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c87614611.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c87614611.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c87614611.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c87614611.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -37,8 +37,8 @@ function c88513608.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,8 +37,8 @@ function c88513608.condition(e,tp,eg,ep,ev,re,r,rp)
return c88513608.check(tp) return c88513608.check(tp)
end end
function c88513608.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c88513608.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -37,7 +37,7 @@ function c90727556.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function c90727556.condition(e,tp,eg,ep,ev,re,r,rp)
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP) and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end end
function c90727556.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c90727556.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
--極星邪狼フェンリル
function c91697229.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(91697229,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENCE,1)
e1:SetCondition(c91697229.spcon)
c:RegisterEffect(e1)
--self destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_SELF_DESTROY)
e4:SetCondition(c91697229.descon)
c:RegisterEffect(e4)
--pos
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(91697229,1))
e5:SetCategory(CATEGORY_POSITION)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE_START+PHASE_BATTLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c91697229.poscon)
e5:SetTarget(c91697229.postg)
e5:SetOperation(c91697229.posop)
c:RegisterEffect(e5)
--damage
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e6:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e6:SetOperation(c91697229.damop)
c:RegisterEffect(e6)
end
function c91697229.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c91697229.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c91697229.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4b)
end
function c91697229.descon(e)
return not Duel.IsExistingMatchingCard(c91697229.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c91697229.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c91697229.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c91697229.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
end
end
function c91697229.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(1-ep,ev,false)
end
...@@ -36,7 +36,7 @@ function c93085839.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function c93085839.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c93085839.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c93085839.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
......
...@@ -13,8 +13,8 @@ function c93431518.initial_effect(c) ...@@ -13,8 +13,8 @@ function c93431518.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c93431518.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c93431518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -11,7 +11,7 @@ function c95026693.initial_effect(c) ...@@ -11,7 +11,7 @@ function c95026693.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c95026693.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c95026693.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckAttackActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_ATTACK)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
......
...@@ -34,9 +34,9 @@ function c95291684.cfilter(c) ...@@ -34,9 +34,9 @@ function c95291684.cfilter(c)
end end
function c95291684.sprcon(e,c) function c95291684.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local p=c:GetControler() local tp=c:GetControler()
return not Duel.CheckNormalSummonActivity(p) and Duel.GetFieldGroupCount(p,0,LOCATION_MZONE)>0 return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.GetLocationCount(p,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c95291684.cfilter,p,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c95291684.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c95291684.spcon(e,tp,eg,ep,ev,re,r,rp) function c95291684.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
...@@ -12,7 +12,7 @@ function c96142517.initial_effect(c) ...@@ -12,7 +12,7 @@ function c96142517.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c96142517.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c96142517.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -13,7 +13,7 @@ function c98645731.initial_effect(c) ...@@ -13,7 +13,7 @@ function c98645731.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
--oath effects --oath effects
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -20,7 +20,7 @@ function c99311109.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,7 @@ function c99311109.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c99311109.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c99311109.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c99311109.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c99311109.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......
...@@ -11,8 +11,8 @@ function c99789342.initial_effect(c) ...@@ -11,8 +11,8 @@ function c99789342.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c99789342.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c99789342.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -663,3 +663,9 @@ DUEL_ENABLE_PRIORITY =0x08 --启动优先权 ...@@ -663,3 +663,9 @@ DUEL_ENABLE_PRIORITY =0x08 --启动优先权
DUEL_PSEUDO_SHUFFLE =0x10 --不洗牌 DUEL_PSEUDO_SHUFFLE =0x10 --不洗牌
DUEL_TAG_MODE =0x20 --双打 DUEL_TAG_MODE =0x20 --双打
DUEL_SIMPLE_AI =0x40 --AI DUEL_SIMPLE_AI =0x40 --AI
--
ACTIVITY_SUMMON =1
ACTIVITY_NORMALSUMMON =2
ACTIVITY_FLIPSUMMON =3
ACTIVITY_SPSUMMON =4
ACTIVITY_ATTACK =5
...@@ -902,6 +902,7 @@ function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale) ...@@ -902,6 +902,7 @@ function Auxiliary.PConditionFilter(c,e,tp,lscale,rscale)
local lv=c:GetLevel() local lv=c:GetLevel()
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM))) return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) and lv>lscale and lv<rscale and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false)
and not c:IsForbidden()
end end
function Auxiliary.PendCondition() function Auxiliary.PendCondition()
return function(e,c,og) return function(e,c,og)
......
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