Commit 9824047d authored by argon.sun's avatar argon.sun

new scripts

parent 26e0bfa5
......@@ -111,7 +111,7 @@ int32 effect::is_activateable(uint8 playerid, tevent& e, int32 neglect_cond, int
return FALSE;
if((flag & EFFECT_FLAG_COUNT_LIMIT) && (reset_count & 0xf00) == 0)
return FALSE;
if (!(flag & EFFECT_FLAG_FIELD_ONLY)) {
if (!(flag & EFFECT_FLAG_FIELD_ONLY) && !neglect_cond) {
if (type & EFFECT_TYPE_ACTIVATE) {
if(handler->current.controler != playerid)
return FALSE;
......
......@@ -926,16 +926,14 @@ int32 field::filter_field_card(uint8 self, uint32 location1, uint32 location2, g
}
return count;
}
int32 field::is_player_affected_by_effect(uint8 playerid, uint32 code) {
effect* peffect;
pair<effect_container::iterator, effect_container::iterator> rg;
rg = effects.aura_effect.equal_range(code);
effect* field::is_player_affected_by_effect(uint8 playerid, uint32 code) {
auto rg = effects.aura_effect.equal_range(code);
for (; rg.first != rg.second; ++rg.first) {
peffect = rg.first->second;
effect* peffect = rg.first->second;
if (peffect->is_target_player(playerid) && peffect->is_available())
return TRUE;
return peffect;
}
return FALSE;
return 0;
}
int32 field::get_release_list(uint8 playerid, card_set* release_list, card_set* ex_list, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp) {
card* pcard;
......
......@@ -304,7 +304,7 @@ public:
void filter_player_effect(uint8 playerid, uint32 code, effect_set* eset, uint8 sort = TRUE);
int32 filter_matching_card(int32 findex, uint8 self, uint32 location1, uint32 location2, group* pgroup, card* pexception, uint32 extraargs, card** pret = 0, int32 fcount = 0, int32 is_target = FALSE);
int32 filter_field_card(uint8 self, uint32 location, uint32 location2, group* pgroup);
int32 is_player_affected_by_effect(uint8 playerid, uint32 code);
effect* is_player_affected_by_effect(uint8 playerid, uint32 code);
int32 get_release_list(uint8 playerid, card_set* release_list, card_set* ex_list, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp);
int32 check_release_list(uint8 playerid, int32 count, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp);
......
......@@ -24,7 +24,10 @@ int32 scriptlib::card_get_origin_code(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->data.code);
if(pcard->data.alias)
lua_pushinteger(L, pcard->data.alias);
else
lua_pushinteger(L, pcard->data.code);
return 1;
}
int32 scriptlib::card_is_set_card(lua_State *L) {
......
......@@ -999,10 +999,15 @@ int32 scriptlib::duel_replace_attacker(lua_State *L) {
}
int32 scriptlib::duel_change_attack_target(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* target = *(card**) lua_touserdata(L, 1);
duel* pduel = target->pduel;
pduel->game_field->core.sub_attack_target = target;
if(lua_isnil(L, 1)) {
duel* pduel = interpreter::get_duel_info(L);
pduel->game_field->core.sub_attack_target = 0;
} else {
check_param(L, PARAM_TYPE_CARD, 1);
card* target = *(card**) lua_touserdata(L, 1);
duel* pduel = target->pduel;
pduel->game_field->core.sub_attack_target = target;
}
return 0;
}
int32 scriptlib::duel_replace_attack_target(lua_State *L) {
......@@ -1258,6 +1263,7 @@ int32 scriptlib::duel_skip_phase(lua_State *L) {
uint32 phase = lua_tointeger(L, 2);
uint32 reset = lua_tointeger(L, 3);
uint32 count = lua_tointeger(L, 4);
uint32 value = lua_tointeger(L, 5);
if(count <= 0)
count = 1;
duel* pduel = interpreter::get_duel_info(L);
......@@ -1284,6 +1290,7 @@ int32 scriptlib::duel_skip_phase(lua_State *L) {
peffect->s_range = 1;
peffect->o_range = 0;
peffect->reset_count |= count & 0xff;
peffect->value = value;
pduel->game_field->add_effect(peffect, playerid);
return 0;
}
......@@ -2463,7 +2470,7 @@ int32 scriptlib::duel_is_player_affected_by_effect(lua_State *L) {
return 1;
}
int32 code = lua_tointeger(L, 2);
lua_pushboolean(L, pduel->game_field->is_player_affected_by_effect(playerid, code));
lua_pushboolean(L, pduel->game_field->is_player_affected_by_effect(playerid, code) ? 1 : 0);
return 1;
}
int32 scriptlib::duel_is_player_can_draw(lua_State * L) {
......
......@@ -1205,6 +1205,11 @@ int32 field::process_phase_event(int16 step, int32 phase) {
return FALSE;
}
case 1: {
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))) {
core.units.begin()->step = 14;
return FALSE;
}
int32 phase_event = EVENT_PHASE + phase;
pair<effect_container::iterator, effect_container::iterator> pr;
pr = effects.trigger_f_effect.equal_range(phase_event);
......@@ -2345,11 +2350,16 @@ int32 field::process_battle_command(uint16 step) {
core.chain_attack_target = 0;
core.attacker = 0;
core.attack_target = 0;
if(is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP)) {
if(peffect = is_player_affected_by_effect(infos.turn_player, EFFECT_SKIP_BP)) {
core.units.begin()->step = 29;
core.units.begin()->arg1 = 2;
add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0);
adjust_all();
if(!peffect->value)
add_process(PROCESSOR_PHASE_EVENT, 0, 0, 0, PHASE_BATTLE, 0);
else {
core.hint_timing[infos.turn_player] = 0;
reset_phase(PHASE_BATTLE);
adjust_all();
}
return FALSE;
}
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
......@@ -2636,7 +2646,7 @@ int32 field::process_battle_command(uint16 step) {
reset_phase(PHASE_DAMAGE);
return FALSE;
}
if(core.sub_attack_target != (card*)0xffffffff) {
if(core.sub_attack_target != (card*)0xffffffff && (!core.sub_attack_target || core.sub_attack_target->current.location == LOCATION_MZONE)) {
core.attacker->announce_count++;
core.attacker->attacked_count++;
pduel->write_buffer8(MSG_ATTACK);
......
--ネコマネキング
function c11021521.initial_effect(c)
--end turn
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11021521,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c11021521.condition)
e1:SetOperation(c11021521.operation)
c:RegisterEffect(e1)
end
function c11021521.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetTurnPlayer()~=tp and c:GetPreviousControler()==tp
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c11021521.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(1-tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(1-tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(1-tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--暴風小僧
function c15090429.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c15090429.condition)
c:RegisterEffect(e1)
end
function c15090429.condition(e,c)
return c:IsAttribute(ATTRIBUTE_WIND)
end
--トゥーン·ワールド
function c15259704.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c15259704.cost)
c:RegisterEffect(e1)
end
function c15259704.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
--トゥーン·ゴブリン突撃部隊
function c15270885.initial_effect(c)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c15270885.atklimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c15270885.sdescon)
e4:SetOperation(c15270885.sdesop)
c:RegisterEffect(e4)
--direct attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DIRECT_ATTACK)
e5:SetCondition(c15270885.dircon)
c:RegisterEffect(e5)
--to defence
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(c15270885.poscon)
e6:SetOperation(c15270885.posop)
c:RegisterEffect(e6)
end
function c15270885.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c15270885.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c15270885.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c15270885.sfilter,1,nil)
end
function c15270885.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c15270885.dirfilter1(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c15270885.dirfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c15270885.dircon(e)
return Duel.IsExistingMatchingCard(c15270885.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c15270885.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c15270885.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackedCount()>0
end
function c15270885.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttack() then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,3)
c:RegisterEffect(e1)
end
--トゥーン·仮面魔道士
function c16392422.initial_effect(c)
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c16392422.atklimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c16392422.sdescon)
e4:SetOperation(c16392422.sdesop)
c:RegisterEffect(e4)
--direct attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DIRECT_ATTACK)
e5:SetCondition(c16392422.dircon)
c:RegisterEffect(e5)
--draw
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(16392422,0))
e6:SetCategory(CATEGORY_DRAW)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_BATTLE_DAMAGE)
e6:SetTarget(c16392422.target)
e6:SetOperation(c16392422.operation)
c:RegisterEffect(e6)
end
function c16392422.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c16392422.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c16392422.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16392422.sfilter,1,nil)
end
function c16392422.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c16392422.dirfilter1(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c16392422.dirfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c16392422.dircon(e)
return Duel.IsExistingMatchingCard(c16392422.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c16392422.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c16392422.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c16392422.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--カイザー·シーホース
function c17444133.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c17444133.condition)
c:RegisterEffect(e1)
end
function c17444133.condition(e,c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
--門前払い
function c20374520.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20374520,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetTarget(c20374520.target)
e2:SetOperation(c20374520.operation)
c:RegisterEffect(e2)
end
function c20374520.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,1,0,0)
end
function c20374520.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--徴兵令
function c31000575.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c31000575.target)
e1:SetOperation(c31000575.operation)
c:RegisterEffect(e1)
end
function c31000575.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0 end
end
function c31000575.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(1-tp,1)
local g=Duel.GetDecktopGroup(1-tp,1)
local tc=g:GetFirst()
if not tc then return end
if tc:IsSummonableCard() and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.DisableShuffleCheck()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
--トゥーン·ドラゴン·エッガー
function c38369349.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c38369349.spcon)
e2:SetOperation(c38369349.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c38369349.sdescon)
e3:SetOperation(c38369349.sdesop)
c:RegisterEffect(e3)
--direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c38369349.dircon)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c38369349.attg)
e5:SetCondition(c38369349.atcon)
e5:SetValue(c38369349.atval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e6:SetCondition(c38369349.atcon)
c:RegisterEffect(e6)
--cannot attack
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c38369349.atklimit)
c:RegisterEffect(e7)
--attack cost
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_ATTACK_COST)
e8:SetCost(c38369349.atcost)
e8:SetOperation(c38369349.atop)
c:RegisterEffect(e8)
end
function c38369349.cfilter(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c38369349.spcon(e,c)
if c==nil then return true end
if not Duel.IsExistingMatchingCard(c38369349.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
elseif lv<7 then return Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.CheckReleaseGroup(tp,nil,2,nil) end
end
function c38369349.spop(e,tp,eg,ep,ev,re,r,rp,c)
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then
elseif lv<7 then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
else
local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil)
Duel.Release(g,REASON_COST)
end
end
function c38369349.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c38369349.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c38369349.sfilter,1,nil)
end
function c38369349.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c38369349.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c38369349.dircon(e)
return not Duel.IsExistingMatchingCard(c38369349.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c38369349.atcon(e)
return Duel.IsExistingMatchingCard(c38369349.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c38369349.attg(e,c)
return not c:IsType(TYPE_TOON)
end
function c38369349.atval(e,c)
return c==e:GetHandler()
end
function c38369349.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c38369349.atcost(e,c,tp)
return Duel.CheckLPCost(tp,500)
end
function c38369349.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
--炎を支配する者
function c41089128.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c41089128.condition)
c:RegisterEffect(e1)
end
function c41089128.condition(e,c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
......@@ -52,9 +52,15 @@ end
function c42386471.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c42386471.dirfilter1(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c42386471.dirfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c42386471.dircon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,15259703)
and not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil,TYPE_TOON)
return Duel.IsExistingMatchingCard(c42386471.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c42386471.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c42386471.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
--シー·アーチャー
function c4252828.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4252828,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c4252828.eqcon)
e1:SetTarget(c4252828.eqtg)
e1:SetOperation(c4252828.eqop)
c:RegisterEffect(e1)
--Destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(c4252828.desreptg)
e2:SetOperation(c4252828.desrepop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c4252828.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=e:GetLabelObject()
return ec==nil or not ec:IsHasCardTarget(c) or ec:GetFlagEffect(4252828)==0
end
function c4252828.filter(c)
return c:IsFaceup() and c:IsLevelBelow(3)
end
function c4252828.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c4252828.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)~=0
and Duel.IsExistingTarget(c4252828.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c4252828.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c4252828.eqlimit(e,c)
return e:GetOwner()==c
end
function c4252828.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(4252828,RESET_EVENT+0x1fe0000,0,0)
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c4252828.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(800)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
end
function c4252828.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec=e:GetLabelObject():GetLabelObject()
if chk==0 then return ec and ec:IsHasCardTarget(c)
and not ec:IsStatus(STATUS_DESTROY_CONFIRMED) and ec:GetFlagEffect(4252828)~=0 end
return Duel.SelectYesNo(tp,aux.Stringid(4252828,1))
end
function c4252828.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject():GetLabelObject(),REASON_EFFECT+REASON_REPLACE)
end
......@@ -31,6 +31,6 @@ function c43385557.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*600)
end
function c43385557.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_MZONE,0,nil,RACE_PSYCHO)
local ct=Duel.GetMatchingGroupCount(c43385557.filter,tp,LOCATION_MZONE,0,nil)
Duel.Recover(tp,ct*600,REASON_EFFECT)
end
--トゥーン·ディフェンス
function c43509019.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change battle target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43509019,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c43509019.cbcon)
e1:SetOperation(c43509019.cbop)
c:RegisterEffect(e1)
end
function c43509019.cbcon(e,tp,eg,ep,ev,re,r,rp)
local bt=eg:GetFirst()
return bt:IsFaceup() and bt:IsLevelBelow(4) and bt:IsType(TYPE_TOON) and bt:GetControler()==e:GetHandlerPlayer()
end
function c43509019.cbop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeAttackTarget(nil)
end
......@@ -11,20 +11,24 @@ function c4440873.initial_effect(c)
c:RegisterEffect(e1)
end
function c4440873.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c4440873.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c4440873.filter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp)
end
function c4440873.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(Card.IsRelateToEffect,nil,e)
local sg=eg:Filter(c4440873.filter,nil,e,1-tp)
if sg:GetCount()==0 then
elseif sg:GetCount()==1 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
else
local dg=sg:Select(ep,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=sg:Select(1-tp,1,1,nil)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end
end
--ダブルコストン
function c44436472.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c44436472.condition)
c:RegisterEffect(e1)
end
function c44436472.condition(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
......@@ -41,7 +41,8 @@ function c4545854.adup(c,oc)
c:RegisterEffect(e2)
end
function c4545854.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end
if chk==0 then return not e:GetHandler():IsReason(REASON_RULE)
and Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(4545854,0)) then
Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_EFFECT)
return true
......
......@@ -10,19 +10,19 @@ function c47247413.initial_effect(c)
e1:SetOperation(c47247413.activate)
c:RegisterEffect(e1)
end
function c47247413.filter(c,e,tp)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsControler(tp) and (not e or c:IsRelateToEffect(e))
end
function c47247413.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_GRAVE)
return eg:IsExists(c47247413.filter,1,nil,nil,1-tp)
end
function c47247413.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
function c47247413.filter(c,e)
return c:IsPreviousLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e)
end
function c47247413.activate(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c47247413.filter,nil,e)
local g=eg:Filter(c47247413.filter,nil,e,1-tp)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=g:Select(1-tp,1,1,nil)
......
--イージーチューニング
function c5052212.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c5052212.condition)
e1:SetCost(c5052212.cost)
e1:SetTarget(c5052212.target)
e1:SetOperation(c5052212.activate)
c:RegisterEffect(e1)
end
function c5052212.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c5052212.cfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end
function c5052212.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c5052212.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c5052212.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local atk=g:GetFirst():GetAttack()
if atk<0 then atk=0 end
e:SetLabel(atk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c5052212.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c5052212.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(e:GetLabel())
tc:RegisterEffect(e1)
end
end
......@@ -23,15 +23,18 @@ function c52518793.initial_effect(c)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x19))
e3:SetValue(c52518793.atkval)
c:RegisterEffect(e3)
--Destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c52518793.desreptg)
e4:SetOperation(c52518793.desrepop)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_ATTACK)
c:RegisterEffect(e4)
--Destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_SZONE)
e5:SetTarget(c52518793.desreptg)
e5:SetOperation(c52518793.desrepop)
c:RegisterEffect(e5)
end
function c52518793.atkval(e,c)
return e:GetHandler():GetCounter(0x7)*100
......@@ -46,7 +49,8 @@ function c52518793.acop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x7,1)
end
function c52518793.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,52518793) end
if chk==0 then return not e:GetHandler():IsReason(REASON_RULE)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,52518793) end
return Duel.SelectYesNo(tp,aux.Stringid(52518793,1))
end
function c52518793.desrepop(e,tp,eg,ep,ev,re,r,rp)
......
--ブルーアイズ·トゥーン·ドラゴン
function c53183600.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c53183600.spcon)
e2:SetOperation(c53183600.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c53183600.sdescon)
e3:SetOperation(c53183600.sdesop)
c:RegisterEffect(e3)
--direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c53183600.dircon)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c53183600.attg)
e5:SetCondition(c53183600.atcon)
e5:SetValue(c53183600.atval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e6:SetCondition(c53183600.atcon)
c:RegisterEffect(e6)
--cannot attack
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c53183600.atklimit)
c:RegisterEffect(e7)
--attack cost
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_ATTACK_COST)
e8:SetCost(c53183600.atcost)
e8:SetOperation(c53183600.atop)
c:RegisterEffect(e8)
end
function c53183600.cfilter(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c53183600.spcon(e,c)
if c==nil then return true end
if not Duel.IsExistingMatchingCard(c53183600.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
elseif lv<7 then return Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.CheckReleaseGroup(tp,nil,2,nil) end
end
function c53183600.spop(e,tp,eg,ep,ev,re,r,rp,c)
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then
elseif lv<7 then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
else
local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil)
Duel.Release(g,REASON_COST)
end
end
function c53183600.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c53183600.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c53183600.sfilter,1,nil)
end
function c53183600.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c53183600.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c53183600.dircon(e)
return not Duel.IsExistingMatchingCard(c53183600.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c53183600.atcon(e)
return Duel.IsExistingMatchingCard(c53183600.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c53183600.attg(e,c)
return not c:IsType(TYPE_TOON)
end
function c53183600.atval(e,c)
return c==e:GetHandler()
end
function c53183600.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c53183600.atcost(e,c,tp)
return Duel.CheckLPCost(tp,500)
end
function c53183600.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
--ガイアフレーム
function c53461122.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c53461122.condition)
c:RegisterEffect(e1)
end
function c53461122.condition(e,c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_NORMAL)
end
--ホーリーフレーム
function c54766667.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c54766667.condition)
c:RegisterEffect(e1)
end
function c54766667.condition(e,c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_NORMAL)
end
--千里眼
function c60391791.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60391791,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c60391791.cfcon)
e2:SetCost(c60391791.cfcost)
e2:SetOperation(c60391791.cfop)
c:RegisterEffect(e2)
end
function c60391791.cfcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)~=0
end
function c60391791.cfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,100) end
Duel.PayLPCost(tp,100)
end
function c60391791.cfop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(1-tp,1)
if g:GetCount()~=0 then
Duel.ConfirmCards(tp,g)
end
end
--迷える仔羊
function c60764581.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c60764581.cost)
e1:SetTarget(c60764581.target)
e1:SetOperation(c60764581.activate)
c:RegisterEffect(e1)
end
function c60764581.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c60764581.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c60764581.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
function c60764581.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c60764581.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,60764582,0,0x4011,0,0,1,RACE_BEAST,ATTRIBUTE_EARTH) then
for i=1,2 do
local token=Duel.CreateToken(tp,60764581+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
Duel.SpecialSummonComplete()
end
end
......@@ -86,7 +86,8 @@ end
function c63465535.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec=e:GetLabelObject():GetLabelObject()
if chk==0 then return c:IsReason(REASON_BATTLE) and ec and ec:IsHasCardTarget(c) and ec:GetFlagEffect(63465535)~=0 end
if chk==0 then return c:IsReason(REASON_BATTLE) and ec and ec:IsHasCardTarget(c)
and not ec:IsStatus(STATUS_DESTROY_CONFIRMED) and ec:GetFlagEffect(63465535)~=0 end
return Duel.SelectYesNo(tp,aux.Stringid(63465535,1))
end
function c63465535.desrepop(e,tp,eg,ep,ev,re,r,rp)
......
--トゥーン·マーメイド
function c65458948.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c65458948.spcon)
e2:SetOperation(c65458948.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c65458948.sdescon)
e3:SetOperation(c65458948.sdesop)
c:RegisterEffect(e3)
--direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c65458948.dircon)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c65458948.attg)
e5:SetCondition(c65458948.atcon)
e5:SetValue(c65458948.atval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e6:SetCondition(c65458948.atcon)
c:RegisterEffect(e6)
--cannot attack
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c65458948.atklimit)
c:RegisterEffect(e7)
--attack cost
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_ATTACK_COST)
e8:SetCost(c65458948.atcost)
e8:SetOperation(c65458948.atop)
c:RegisterEffect(e8)
end
function c65458948.cfilter(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c65458948.spcon(e,c)
if c==nil then return true end
if not Duel.IsExistingMatchingCard(c65458948.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
elseif lv<7 then return Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.CheckReleaseGroup(tp,nil,2,nil) end
end
function c65458948.spop(e,tp,eg,ep,ev,re,r,rp,c)
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then
elseif lv<7 then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
else
local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil)
Duel.Release(g,REASON_COST)
end
end
function c65458948.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c65458948.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65458948.sfilter,1,nil)
end
function c65458948.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c65458948.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c65458948.dircon(e)
return not Duel.IsExistingMatchingCard(c65458948.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c65458948.atcon(e)
return Duel.IsExistingMatchingCard(c65458948.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c65458948.attg(e,c)
return not c:IsType(TYPE_TOON)
end
function c65458948.atval(e,c)
return c==e:GetHandler()
end
function c65458948.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c65458948.atcost(e,c,tp)
return Duel.CheckLPCost(tp,500)
end
function c65458948.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
--霧の王
function c6614221.initial_effect(c)
--decrease tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DECREASE_TRIBUTE)
e1:SetValue(0x2)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c6614221.atkop)
c:RegisterEffect(e2)
--cannot release
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_RELEASE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
c:RegisterEffect(e3)
end
function c6614221.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
local tc=mg:GetFirst()
local atk=0
while tc do
local catk=tc:GetBaseAttack()
if catk<0 then catk=0 end
atk=atk+catk
tc=mg:GetNext()
end
if atk~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
--フェニックス·ギア·フリード
function c69488544.initial_effect(c)
aux.EnableDualAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69488544,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c69488544.spcon)
e1:SetTarget(c69488544.sptg)
e1:SetOperation(c69488544.spop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69488544,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c69488544.negcon)
e2:SetCost(c69488544.negcost)
e2:SetTarget(c69488544.negtg)
e2:SetOperation(c69488544.negop)
c:RegisterEffect(e2)
end
function c69488544.spcon(e,tp,eg,ep,ev,re,r,rp)
return aux.IsDualState(e) and rp~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c69488544.filter(c,e,tp)
return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c69488544.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c69488544.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
and Duel.IsExistingTarget(c69488544.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69488544.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69488544.spop(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
function c69488544.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.IsDualState(e) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then return false end
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainInactivatable(ev)
end
function c69488544.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c69488544.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69488544.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c69488544.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c69488544.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c69488544.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
--終わりの始まり
function c73680966.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c73680966.condition)
e1:SetCost(c73680966.cost)
e1:SetTarget(c73680966.target)
e1:SetOperation(c73680966.activate)
c:RegisterEffect(e1)
end
function c73680966.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,7,nil,ATTRIBUTE_DARK)
end
function c73680966.cfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove()
end
function c73680966.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73680966.cfilter,tp,LOCATION_GRAVE,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c73680966.cfilter,tp,LOCATION_GRAVE,0,5,5,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c73680966.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
end
function c73680966.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--デス·カンガルー
function c78613627.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(78613627,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c78613627.condition)
e1:SetTarget(c78613627.target)
e1:SetOperation(c78613627.operation)
c:RegisterEffect(e1)
end
function c78613627.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
end
function c78613627.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end
function c78613627.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.Destroy(a,nil,0,REASON_EFFECT)
end
--青氷の白夜龍
function c79473793.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79473793,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c79473793.negcon)
e1:SetTarget(c79473793.negtg)
e1:SetOperation(c79473793.negop)
c:RegisterEffect(e1)
--change battle target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(79473793,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c79473793.cbcon)
e2:SetCost(c79473793.cbcost)
e2:SetOperation(c79473793.cbop)
c:RegisterEffect(e2)
end
function c79473793.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or not g:IsContains(c) then return false end
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainInactivatable(ev)
end
function c79473793.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c79473793.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
function c79473793.cbcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bt=eg:GetFirst()
return c~=bt and bt:IsFaceup() and bt:GetControler()==c:GetControler()
end
function c79473793.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c79473793.cbcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79473793.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c79473793.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c79473793.cbop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeAttackTarget(e:GetHandler())
end
......@@ -54,9 +54,15 @@ end
function c79875176.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c79875176.dirfilter1(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c79875176.dirfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c79875176.dircon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,15259703)
and not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil,TYPE_TOON)
return Duel.IsExistingMatchingCard(c79875176.dirfilter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c79875176.dirfilter2,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c79875176.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
......
--ブースト·ウォリアー 推进战士
--֩`ȡꥢ`
function c80457744.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--ペンギン·ナイトメア
function c81306586.initial_effect(c)
--return
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81306586,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_FLIP)
e1:SetTarget(c81306586.thtg)
e1:SetOperation(c81306586.thop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e2:SetValue(200)
c:RegisterEffect(e2)
end
function c81306586.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c81306586.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--デビリアン·ソング
function c81489939.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(-1)
c:RegisterEffect(e2)
end
--ダークフレーム
function c81755371.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c81755371.condition)
c:RegisterEffect(e1)
end
function c81755371.condition(e,c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_NORMAL)
end
--`ե
function c8487449.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c8487449.spcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--spsummon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c8487449.regcon)
e2:SetOperation(c8487449.regop)
c:RegisterEffect(e2)
--only 1 can exists
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetCondition(c8487449.excon)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetValue(c8487449.splimit)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SELF_DESTROY)
e6:SetCondition(c8487449.descon)
c:RegisterEffect(e6)
end
function c8487449.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)~=0
and not Duel.IsExistingMatchingCard(c8487449.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c8487449.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c8487449.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(8487449,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c8487449.thcon)
e1:SetTarget(c8487449.thtg)
e1:SetOperation(c8487449.thop)
e1:SetReset(RESET_EVENT+0x16a0000+RESET_PHASE+PHASE_END,2)
e1:SetLabel(Duel.GetTurnCount())
c:RegisterEffect(e1)
end
function c8487449.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel()+1
end
function c8487449.filter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c8487449.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return Duel.IsLocation(LOCATION_MZONE) and c8487449.filter(chkc) end
if chk==0 then return true end
local c=e:GetHandler()
local sp=c:GetSummonPlayer()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c8487449.filter,sp,0,LOCATION_MZONE,1,1,e:GetHandler())
if g:GetCount() then
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end
end
function c8487449.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c8487449.exfilter(c,fid)
return c:IsFaceup() and c:GetCode()==8487449 and (fid==nil or c:GetFieldID()<fid)
end
function c8487449.excon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c8487449.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
function c8487449.splimit(e,se,sp,st,spos,tgp)
if bit.band(spos,POS_FACEDOWN)~=0 then return true end
return not Duel.IsExistingMatchingCard(c8487449.exfilter,tgp,LOCATION_ONFIELD,0,1,nil)
end
function c8487449.descon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c8487449.exfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil,c:GetFieldID())
end
......@@ -52,6 +52,7 @@ function c87902575.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
function c87902575.rmop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY) then
tc:CreateRelation(e:GetHandler(),RESET_EVENT+0x1fe0000)
......@@ -66,6 +67,7 @@ function c87902575.retcon(e,tp,eg,ep,ev,re,r,rp)
return g:FilterCount(c87902575.retfilter,nil,e:GetHandler(),Duel.GetTurnPlayer())>0
end
function c87902575.retop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p=Duel.GetTurnPlayer()
local lg=e:GetLabelObject():GetLabelObject()
local g=lg:Filter(c87902575.retfilter,nil,e:GetHandler(),p)
......
--捨て身の宝札
function c88513608.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c88513608.condition)
e1:SetCost(c88513608.cost)
e1:SetTarget(c88513608.target)
e1:SetOperation(c88513608.activate)
c:RegisterEffect(e1)
end
function c88513608.check(tp)
local at1=-1
local at2=-2
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then
local atk=tc:GetAttack()
if at1<0 or atk<=at1 then at2=at1 at1=atk end
end
end
if at1<0 or at2<0 then return false end
at1=at1+at2
at2=-1
for i=0,4 do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then
local atk=tc:GetAttack()
if at2<0 or atk<at2 then at2=atk end
end
end
return at1<at2
end
function c88513608.condition(e,tp,eg,ep,ev,re,r,rp)
return c88513608.check(tp)
end
function c88513608.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSummonActivity(tp)
and not Duel.CheckFlipSummonActivity(tp) and not Duel.CheckSpecialSummonActivity(tp) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_OATH)
e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e4:SetReset(RESET_PHASE+PHASE_END)
e4:SetTargetRange(LOCATION_MZONE,0)
Duel.RegisterEffect(e4,tp)
end
function c88513608.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c88513608.activate(e,tp,eg,ep,ev,re,r,rp)
if not c88513608.check(tp) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--トゥーン·ブラック·マジシャン·ガール
function c90960358.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c90960358.spcon)
e2:SetOperation(c90960358.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c90960358.sdescon)
e3:SetOperation(c90960358.sdesop)
c:RegisterEffect(e3)
--direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c90960358.dircon)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c90960358.attg)
e5:SetCondition(c90960358.atcon)
e5:SetValue(c90960358.atval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e6:SetCondition(c90960358.atcon)
c:RegisterEffect(e6)
--cannot attack
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SUMMON_SUCCESS)
e7:SetOperation(c90960358.atklimit)
c:RegisterEffect(e7)
--atkup
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e8:SetCode(EFFECT_UPDATE_ATTACK)
e8:SetRange(LOCATION_MZONE)
e8:SetValue(c90960358.val)
c:RegisterEffect(e8)
end
function c90960358.cfilter(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c90960358.spcon(e,c)
if c==nil then return true end
if not Duel.IsExistingMatchingCard(c90960358.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
elseif lv<7 then return Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.CheckReleaseGroup(tp,nil,2,nil) end
end
function c90960358.spop(e,tp,eg,ep,ev,re,r,rp,c)
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then
elseif lv<7 then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
else
local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil)
Duel.Release(g,REASON_COST)
end
end
function c90960358.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c90960358.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c90960358.sfilter,1,nil)
end
function c90960358.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c90960358.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c90960358.dircon(e)
return not Duel.IsExistingMatchingCard(c90960358.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c90960358.atcon(e)
return Duel.IsExistingMatchingCard(c90960358.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c90960358.attg(e,c)
return not c:IsType(TYPE_TOON)
end
function c90960358.atval(e,c)
return c==e:GetHandler()
end
function c90960358.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c90960358.val(e,c)
return Duel.GetMatchingGroupCount(c90960358.filter,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil)*300
end
function c90960358.filter(c)
local code=c:GetCode()
return code==46986414 or code==40737112
end
--トゥーン·デーモン
function c91842653.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c91842653.spcon)
e2:SetOperation(c91842653.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c91842653.sdescon)
e3:SetOperation(c91842653.sdesop)
c:RegisterEffect(e3)
--direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c91842653.dircon)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetTarget(c91842653.attg)
e5:SetCondition(c91842653.atcon)
e5:SetValue(c91842653.atval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e6:SetCondition(c91842653.atcon)
c:RegisterEffect(e6)
--cannot attack
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c91842653.atklimit)
c:RegisterEffect(e7)
--attack cost
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_ATTACK_COST)
e8:SetCost(c91842653.atcost)
e8:SetOperation(c91842653.atop)
c:RegisterEffect(e8)
end
function c91842653.cfilter(c)
return c:IsFaceup() and c:IsCode(15259703)
end
function c91842653.spcon(e,c)
if c==nil then return true end
if not Duel.IsExistingMatchingCard(c91842653.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)~=0
elseif lv<7 then return Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.CheckReleaseGroup(tp,nil,2,nil) end
end
function c91842653.spop(e,tp,eg,ep,ev,re,r,rp,c)
local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then
elseif lv<7 then
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
else
local g=Duel.SelectReleaseGroup(tp,nil,2,2,nil)
Duel.Release(g,REASON_COST)
end
end
function c91842653.sfilter(c)
return c:IsReason(REASON_DESTROY) and c:IsCode(15259703) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c91842653.sdescon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c91842653.sfilter,1,nil)
end
function c91842653.sdesop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c91842653.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOON)
end
function c91842653.dircon(e)
return not Duel.IsExistingMatchingCard(c91842653.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c91842653.atcon(e)
return Duel.IsExistingMatchingCard(c91842653.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end
function c91842653.attg(e,c)
return not c:IsType(TYPE_TOON)
end
function c91842653.atval(e,c)
return c==e:GetHandler()
end
function c91842653.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c91842653.atcost(e,c,tp)
return Duel.CheckLPCost(tp,500)
end
function c91842653.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,500)
end
--ヒゲアンコウ
function c92084010.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c92084010.condition)
c:RegisterEffect(e1)
end
function c92084010.condition(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
--緊急同調
function c94634433.initial_effect(c)
--synchro effect
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetCondition(c94634433.sccon)
e1:SetTarget(c94634433.sctg)
e1:SetOperation(c94634433.scop)
c:RegisterEffect(e1)
end
function c94634433.sccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE
end
function c94634433.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c94634433.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
--ウィンドフレーム
function c99865167.initial_effect(c)
--double tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
e1:SetValue(c99865167.condition)
c:RegisterEffect(e1)
end
function c99865167.condition(e,c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_NORMAL)
end
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