Commit 25127bfd authored by argon.sun's avatar argon.sun

new scripts

parent b15a04cd
...@@ -337,7 +337,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc ...@@ -337,7 +337,7 @@ void field::move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequenc
} }
add_card(playerid, pcard, location, sequence); add_card(playerid, pcard, location, sequence);
} }
void field::set_control(card* pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count) { void field::set_control(card* pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count) {
if(core.remove_brainwashing || pcard->refresh_control_status() == playerid) if(core.remove_brainwashing || pcard->refresh_control_status() == playerid)
return; return;
effect* peffect = pduel->new_effect(); effect* peffect = pduel->new_effect();
......
...@@ -293,7 +293,7 @@ public: ...@@ -293,7 +293,7 @@ public:
void add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence); void add_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence);
void remove_card(card* pcard); void remove_card(card* pcard);
void move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence); void move_card(uint8 playerid, card* pcard, uint8 location, uint8 sequence);
void set_control(card* pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count); void set_control(card* pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count);
card* get_field_card(uint8 playerid, uint8 location, uint8 sequence); card* get_field_card(uint8 playerid, uint8 location, uint8 sequence);
int32 is_location_useable(uint8 playerid, uint8 location, uint8 sequence); int32 is_location_useable(uint8 playerid, uint8 location, uint8 sequence);
int32 get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32* list = 0); int32 get_useable_count(uint8 playerid, uint8 location, uint8 uplayer, uint32 reason, uint32* list = 0);
...@@ -428,8 +428,8 @@ public: ...@@ -428,8 +428,8 @@ public:
int32 remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 countertype, uint16 count); int32 remove_counter(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 countertype, uint16 count);
int32 remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 min, uint16 max); int32 remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 rplayer, uint8 s, uint8 o, uint16 min, uint16 max);
int32 get_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count); int32 get_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count);
int32 swap_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard1, card* pcard2, uint8 reset_phase, uint8 reset_count); int32 swap_control(uint16 step, effect* reason_effect, uint8 reason_player, card* pcard1, card* pcard2, uint16 reset_phase, uint8 reset_count);
int32 control_adjust(uint16 step); int32 control_adjust(uint16 step);
int32 equip(uint16 step, uint8 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step); int32 equip(uint16 step, uint8 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step);
int32 draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 count); int32 draw(uint16 step, effect* reason_effect, uint32 reason, uint8 reason_player, uint8 playerid, uint32 count);
......
...@@ -901,7 +901,7 @@ int32 scriptlib::duel_get_control(lua_State *L) { ...@@ -901,7 +901,7 @@ int32 scriptlib::duel_get_control(lua_State *L) {
uint32 reset_phase = 0; uint32 reset_phase = 0;
uint32 reset_count = 0; uint32 reset_count = 0;
if(lua_gettop(L) > 2) { if(lua_gettop(L) > 2) {
reset_phase = lua_tointeger(L, 3) & 0xff; reset_phase = lua_tointeger(L, 3) & 0x3ff;
reset_count = lua_tointeger(L, 4) & 0xff; reset_count = lua_tointeger(L, 4) & 0xff;
} }
duel* pduel = target->pduel; duel* pduel = target->pduel;
...@@ -919,8 +919,8 @@ int32 scriptlib::duel_swap_control(lua_State *L) { ...@@ -919,8 +919,8 @@ int32 scriptlib::duel_swap_control(lua_State *L) {
uint32 reset_phase = 0; uint32 reset_phase = 0;
uint32 reset_count = 0; uint32 reset_count = 0;
if(lua_gettop(L) > 2) { if(lua_gettop(L) > 2) {
reset_phase = lua_tointeger(L, 3); reset_phase = lua_tointeger(L, 3) & 0x3ff;
reset_count = lua_tointeger(L, 4); reset_count = lua_tointeger(L, 4) & 0xff;
} }
duel* pduel = pcard1->pduel; duel* pduel = pcard1->pduel;
pduel->game_field->swap_control(pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player, pcard1, pcard2, reset_phase, reset_count); pduel->game_field->swap_control(pduel->game_field->core.reason_effect, pduel->game_field->core.reason_player, pcard1, pcard2, reset_phase, reset_count);
......
...@@ -106,10 +106,10 @@ void field::remove_overlay_card(uint32 reason, card* pcard, uint32 rplayer, uint ...@@ -106,10 +106,10 @@ void field::remove_overlay_card(uint32 reason, card* pcard, uint32 rplayer, uint
add_process(PROCESSOR_REMOVEOL_S, 0, (effect*)(size_t) reason, (group*)pcard, (rplayer << 16) + (s << 8) + o, (max << 16) + min); add_process(PROCESSOR_REMOVEOL_S, 0, (effect*)(size_t) reason, (group*)pcard, (rplayer << 16) + (s << 8) + o, (max << 16) + min);
} }
void field::get_control(effect* reason_effect, uint32 reason_player, card* pcard, uint32 playerid, uint32 reset_phase, uint32 reset_count) { void field::get_control(effect* reason_effect, uint32 reason_player, card* pcard, uint32 playerid, uint32 reset_phase, uint32 reset_count) {
add_process(PROCESSOR_GET_CONTROL, 0, reason_effect, (group*)pcard, 0, (reason_player << 24) + (playerid << 16) + (reset_phase << 8) + reset_count); add_process(PROCESSOR_GET_CONTROL, 0, reason_effect, (group*)pcard, 0, (reason_player << 28) + (playerid << 24) + (reset_phase << 8) + reset_count);
} }
void field::swap_control(effect* reason_effect, uint32 reason_player, card* pcard1, card* pcard2, uint32 reset_phase, uint32 reset_count) { void field::swap_control(effect* reason_effect, uint32 reason_player, card* pcard1, card* pcard2, uint32 reset_phase, uint32 reset_count) {
add_process(PROCESSOR_SWAP_CONTROL, 0, reason_effect, (group*)pcard1, (ptr)pcard2, (reason_player << 24) + (reset_phase << 8) + reset_count); add_process(PROCESSOR_SWAP_CONTROL, 0, reason_effect, (group*)pcard1, (ptr)pcard2, (reason_player << 28) + (reset_phase << 8) + reset_count);
} }
void field::equip(uint32 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step) { void field::equip(uint32 equip_player, card* equip_card, card* target, uint32 up, uint32 is_step) {
add_process(PROCESSOR_EQUIP, 0, 0, (group*)target, (ptr)equip_card, equip_player + (up << 16) + (is_step << 24)); add_process(PROCESSOR_EQUIP, 0, 0, (group*)target, (ptr)equip_card, equip_player + (up << 16) + (is_step << 24));
...@@ -772,7 +772,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8 ...@@ -772,7 +772,7 @@ int32 field::remove_overlay_card(uint16 step, uint32 reason, card* pcard, uint8
} }
return TRUE; return TRUE;
} }
int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard, uint8 playerid, uint8 reset_phase, uint8 reset_count) { int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard, uint8 playerid, uint16 reset_phase, uint8 reset_count) {
switch(step) { switch(step) {
case 0: { case 0: {
if(pcard->current.controler == playerid) { if(pcard->current.controler == playerid) {
...@@ -819,7 +819,7 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe ...@@ -819,7 +819,7 @@ int32 field::get_control(uint16 step, effect * reason_effect, uint8 reason_playe
} }
return TRUE; return TRUE;
} }
int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard1, card * pcard2, uint8 reset_phase, uint8 reset_count) { int32 field::swap_control(uint16 step, effect * reason_effect, uint8 reason_player, card * pcard1, card * pcard2, uint16 reset_phase, uint8 reset_count) {
switch(step) { switch(step) {
case 0: { case 0: {
uint8 p1 = pcard1->current.controler, p2 = pcard2->current.controler; uint8 p1 = pcard1->current.controler, p2 = pcard2->current.controler;
......
...@@ -431,14 +431,14 @@ int32 field::process() { ...@@ -431,14 +431,14 @@ int32 field::process() {
return pduel->bufferlen; return pduel->bufferlen;
} }
case PROCESSOR_GET_CONTROL: { case PROCESSOR_GET_CONTROL: {
if (get_control(it->step, it->peffect, (it->arg2 >> 24) & 0xff, (card*)it->ptarget, (it->arg2 >> 16) & 0xff, (it->arg2 >> 8) & 0xff, it->arg2 & 0xff)) { if (get_control(it->step, it->peffect, (it->arg2 >> 28) & 0xf, (card*)it->ptarget, (it->arg2 >> 24) & 0xf, (it->arg2 >> 8) & 0x3ff, it->arg2 & 0xff)) {
core.units.pop_front(); core.units.pop_front();
} else } else
core.units.begin()->step++; core.units.begin()->step++;
return pduel->bufferlen; return pduel->bufferlen;
} }
case PROCESSOR_SWAP_CONTROL: { case PROCESSOR_SWAP_CONTROL: {
if (swap_control(it->step, it->peffect, (it->arg2 >> 24) & 0xff, (card*)it->ptarget, (card*)it->arg1, (it->arg2 >> 8) & 0xff, it->arg2 & 0xff)) { if (swap_control(it->step, it->peffect, (it->arg2 >> 28) & 0xf, (card*)it->ptarget, (card*)it->arg1, (it->arg2 >> 8) & 0x3ff, it->arg2 & 0xff)) {
core.units.pop_front(); core.units.pop_front();
} else } else
core.units.begin()->step++; core.units.begin()->step++;
......
--運命の火時計
function c1082946.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1082946.target)
e1:SetOperation(c1082946.activate)
c:RegisterEffect(e1)
end
function c1082946.filter(c)
return c:GetFlagEffect(1082946)~=0
end
function c1082946.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1082946.filter,tp,0x3f,0x3f,1,nil) end
end
function c1082946.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1082946,0))
local g=Duel.SelectMatchingCard(tp,c1082946.filter,tp,0x3f,0x3f,1,1,nil)
local tc=g:GetFirst()
local turne=tc[tc]
local op=turne:GetOperation()
op(turne,turne:GetOwnerPlayer(),nil,0,0,0,0,0)
end
...@@ -25,14 +25,15 @@ function c12600382.initial_effect(c) ...@@ -25,14 +25,15 @@ function c12600382.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atkup --atkup
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetDescription(aux.Stringid(12600382,0)) e4:SetDescription(aux.Stringid(12600382,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY) e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c12600382.condition) e4:SetCountLimit(1)
e4:SetCost(c12600382.cost) e4:SetProperty(EFFECT_FLAG_REPEAT)
e4:SetOperation(c12600382.operation) e4:SetCondition(c12600382.atkcon)
e4:SetOperation(c12600382.atkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--selfdes --selfdes
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
...@@ -40,7 +41,7 @@ function c12600382.initial_effect(c) ...@@ -40,7 +41,7 @@ function c12600382.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_SELF_DESTROY) e5:SetCode(EFFECT_SELF_DESTROY)
e5:SetCondition(c12600382.descondition) e5:SetCondition(c12600382.descon)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c12600382.efdes(e,re) function c12600382.efdes(e,re)
...@@ -49,25 +50,21 @@ end ...@@ -49,25 +50,21 @@ end
function c12600382.splimit(e,se,sp,st) function c12600382.splimit(e,se,sp,st)
return st==(SUMMON_TYPE_SPECIAL+332449) return st==(SUMMON_TYPE_SPECIAL+332449)
end end
function c12600382.condition(e,tp,eg,ep,ev,re,r,rp) function c12600382.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() return tp==Duel.GetTurnPlayer()
end end
function c12600382.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c12600382.atkop(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return e:GetHandler():GetFlagEffect(12600382)==0 end
e:GetHandler():RegisterFlagEffect(12600382,RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END,EFFECT_FLAG_OATH,1)
end
function c12600382.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(500) e1:SetValue(500)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c12600382.descondition(e) function c12600382.descon(e)
local p=e:GetHandler():GetControler() local p=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,8124921) return not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,8124921)
or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,44519536) or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,44519536)
or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,70903634) or not Duel.IsExistingMatchingCard(Card.IsCode,p,LOCATION_GRAVE,0,1,nil,70903634)
......
...@@ -23,14 +23,17 @@ function c13599884.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,14 +23,17 @@ function c13599884.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c13599884.descon)
e1:SetOperation(c13599884.desop) e1:SetOperation(c13599884.desop)
e1:SetLabel(0) e1:SetLabel(0)
e1:SetOwnerPlayer(tp) e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c13599884.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetOwnerPlayer()~=Duel.GetTurnPlayer()
end
function c13599884.desop(e,tp,eg,ep,ev,re,r,rp) function c13599884.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetOwnerPlayer()==Duel.GetTurnPlayer() then return end
local ct=e:GetLabel() local ct=e:GetLabel()
ct=ct+1 ct=ct+1
e:SetLabel(ct) e:SetLabel(ct)
......
--結束 UNITY
function c14731897.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DEFCHANGE)
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(c14731897.condition)
e1:SetTarget(c14731897.target)
e1:SetOperation(c14731897.activate)
c:RegisterEffect(e1)
end
function c14731897.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c14731897.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local def=0
local sc=g:GetFirst()
while sc do
local cdef=sc:GetBaseDefence()
if cdef<0 then cdef=0 end
def=def+cdef
sc=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENCE)
e1:SetValue(def)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
end
end
--古代の遠眼鏡
function c17092736.initial_effect(c)
--confirm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c17092736.cftg)
e1:SetOperation(c17092736.cfop)
c:RegisterEffect(e1)
end
function c17092736.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5 end
Duel.SetTargetPlayer(tp)
end
function c17092736.cfop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetDecktopGroup(1-p,5)
if g:GetCount()>0 then
Duel.ConfirmCards(p,g)
end
end
--セベクの祝福
function c22537443.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c22537443.reccon)
e1:SetTarget(c22537443.rectg)
e1:SetOperation(c22537443.recop)
c:RegisterEffect(e1)
end
function c22537443.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c22537443.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c22537443.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--マキシマム·シックス
function c30707994.initial_effect(c)
--dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30707994,0))
e1:SetCategory(CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c30707994.condition)
e1:SetTarget(c30707994.target)
e1:SetOperation(c30707994.operation)
c:RegisterEffect(e1)
end
function c30707994.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c30707994.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c30707994.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local dice=Duel.TossDice(tp,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(dice*200)
c:RegisterEffect(e1)
end
end
--リターン·ゾンビ
function c3072077.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3072077,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c3072077.condition)
e1:SetCost(c3072077.cost)
e1:SetTarget(c3072077.target)
e1:SetOperation(c3072077.operation)
c:RegisterEffect(e1)
end
function c3072077.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c3072077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c3072077.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c3072077.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
...@@ -45,6 +45,17 @@ function c35027493.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,17 @@ function c35027493.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c35027493.desop) e1:SetOperation(c35027493.desop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c35027493.turncon)
e2:SetOperation(c35027493.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c35027493[e:GetHandler()]=e2
end end
function c35027493.desop(e,tp,eg,ep,ev,re,r,rp) function c35027493.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end if ep==e:GetOwnerPlayer() then return end
...@@ -55,3 +66,16 @@ function c35027493.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,3 +66,16 @@ function c35027493.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(ep) Duel.ShuffleHand(ep)
end end
function c35027493.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c35027493.turnop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end
...@@ -16,7 +16,8 @@ function c35149085.filter(c) ...@@ -16,7 +16,8 @@ function c35149085.filter(c)
end end
function c35149085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35149085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35149085.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35149085.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c35149085.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c35149085.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
--ギルフォード·ザ·ライトニング
function c36354007.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36354007,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c36354007.ttcon)
e1:SetOperation(c36354007.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE+1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(36354007,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c36354007.descon)
e2:SetTarget(c36354007.destg)
e2:SetOperation(c36354007.desop)
c:RegisterEffect(e2)
end
function c36354007.ttcon(e,c)
if c==nil then return true end
return Duel.GetTributeCount(c)>=3
end
function c36354007.ttop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g, REASON_SUMMON+REASON_MATERIAL)
end
function c36354007.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+1
end
function c36354007.filter(c)
return c:IsDestructable()
end
function c36354007.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c36354007.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0,nil)
end
function c36354007.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c36354007.filter,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--炎星皇-チョウライオ
function c37057743.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c37057743.xyzfilter,2)
c:EnableReviveLimit()
--salvage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(37057743,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c37057743.thcost)
e1:SetTarget(c37057743.thtg)
e1:SetOperation(c37057743.thop)
c:RegisterEffect(e1)
end
function c37057743.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:GetLevel()==3
end
function c37057743.thcost(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 c37057743.filter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c37057743.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c37057743.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c37057743.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c37057743.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c37057743.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c37057743.sumlimit)
e1:SetLabel(tc:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
end
function c37057743.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
--闇の破神剣
function c37120512.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c37120512.target)
e1:SetOperation(c37120512.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(400)
c:RegisterEffect(e2)
--def down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENCE)
e3:SetValue(-200)
c:RegisterEffect(e3)
--equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c37120512.eqlimit)
c:RegisterEffect(e4)
end
function c37120512.eqlimit(e,c)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function c37120512.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK)
end
function c37120512.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c37120512.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c37120512.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c37120512.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c37120512.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--魂の綱
function c37383714.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c37383714.condition)
e1:SetCost(c37383714.cost)
e1:SetTarget(c37383714.target)
e1:SetOperation(c37383714.activate)
c:RegisterEffect(e1)
end
function c37383714.cfilter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
end
function c37383714.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c37383714.cfilter,1,nil,tp)
end
function c37383714.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 c37383714.spfilter(c,e,tp)
return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c37383714.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c37383714.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c37383714.activate(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,c37383714.spfilter,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 c37390589.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c37390589.condition)
e1:SetTarget(c37390589.target)
e1:SetOperation(c37390589.operation)
c:RegisterEffect(e1)
end
function c37390589.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c37390589.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then
return false
elseif e:GetLabel()==1 then
return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
else return false end
end
local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp
and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsCanBeEffectTarget(e)
local b2=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 end
local opt=0
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(37390589,0),aux.Stringid(37390589,1),aux.Stringid(37390589,2))
elseif b1 then
opt=Duel.SelectOption(tp,aux.Stringid(37390589,0))
else
opt=Duel.SelectOption(tp,aux.Stringid(37390589,1))+1
end
e:SetLabel(opt)
if opt==0 or opt==2 then
Duel.SetTargetCard(Duel.GetAttacker())
end
if opt==1 or opt==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
end
function c37390589.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=e:GetLabel()
if opt==0 or opt==2 then
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)
end
end
if opt==1 or opt==2 then
local tc=e:GetLabelObject()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c37390589.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
end
end
function c37390589.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer()
end
--鎖付きブーメラン
function c37390590.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c37390590.condition)
e1:SetTarget(c37390590.target)
e1:SetOperation(c37390590.operation)
c:RegisterEffect(e1)
end
function c37390590.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c37390590.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then
return false
elseif e:GetLabel()==1 then
return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup()
else return false end
end
local b1=Duel.CheckEvent(EVENT_ATTACK_ANNOUNCE) and Duel.GetTurnPlayer()~=tp
and Duel.GetAttacker():IsLocation(LOCATION_MZONE) and Duel.GetAttacker():IsCanBeEffectTarget(e)
local b2=Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 end
local opt=0
if b1 and b2 then
opt=Duel.SelectOption(tp,aux.Stringid(37390590,0),aux.Stringid(37390590,1),aux.Stringid(37390590,2))
elseif b1 then
opt=Duel.SelectOption(tp,aux.Stringid(37390590,0))
else
opt=Duel.SelectOption(tp,aux.Stringid(37390590,1))+1
end
e:SetLabel(opt)
if opt==0 or opt==2 then
Duel.SetTargetCard(Duel.GetAttacker())
end
if opt==1 or opt==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
end
function c37390590.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local opt=e:GetLabel()
if opt==0 or opt==2 then
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)
end
end
if opt==1 or opt==2 then
local tc=e:GetLabelObject()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
--Equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c37390590.eqlimit)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
end
end
function c37390590.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer()
end
--モンスターレリーフ
function c37507488.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c37507488.condition)
e1:SetTarget(c37507488.target)
e1:SetOperation(c37507488.activate)
c:RegisterEffect(e1)
end
function c37507488.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c37507488.filter(c)
return c:IsAbleToHand()
end
function c37507488.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c37507488.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c37507488.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c37507488.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c37507488.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c37507488.spfilter(c,e,tp)
return c:GetLevel()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c37507488.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c37507488.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--ダーク·アイズ·イリュージョニスト
function c38247752.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38247752,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c38247752.target)
e1:SetOperation(c38247752.operation)
c:RegisterEffect(e1)
end
function c38247752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end
function c38247752.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c38247752.rcon)
tc:RegisterEffect(e1,true)
end
end
function c38247752.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
...@@ -40,8 +40,6 @@ function c40044918.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,8 +40,6 @@ function c40044918.tg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
e:SetLabel(sel) e:SetLabel(sel)
if sel==1 then if sel==1 then
local g=Duel.GetMatchingGroup(c40044918.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end else Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end
end end
function c40044918.op(e,tp,eg,ep,ev,re,r,rp) function c40044918.op(e,tp,eg,ep,ev,re,r,rp)
......
--硫酸のたまった落とし穴
function c41356845.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c41356845.target)
e1:SetOperation(c41356845.activate)
c:RegisterEffect(e1)
end
function c41356845.filter(c)
return c:IsFacedown()
end
function c41356845.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c41356845.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c41356845.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c41356845.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c41356845.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ChangePosition(tc,0,POS_FACEUP_ATTACK,0,POS_FACEUP_DEFENCE)
if tc:IsDefenceBelow(2000) then
Duel.Destroy(tc,REASON_EFFECT)
else
Duel.ConfirmCards(1-tc:GetControler(),tc)
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE)
end
end
end
--硫酸のたまった落とし穴
function c41356846.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c41356846.target)
e1:SetOperation(c41356846.activate)
c:RegisterEffect(e1)
end
function c41356846.filter(c)
return c:IsFacedown()
end
function c41356846.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c41356846.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c41356846.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c41356846.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c41356846.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ChangePosition(tc,0,POS_FACEUP_ATTACK,0,POS_FACEUP_DEFENCE)
if tc:IsDefenceBelow(2000) then
Duel.Destroy(tc,REASON_EFFECT)
else
Duel.ConfirmCards(1-tc:GetControler(),tc)
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE)
end
end
end
--避雷針
function c42364257.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c42364257.condition)
e1:SetTarget(c42364257.target)
e1:SetOperation(c42364257.activate)
c:RegisterEffect(e1)
end
function c42364257.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(12580477) and Duel.IsChainDisablable(ev)
end
function c42364257.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c42364257.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--ホワイト·ホール
function c43487744.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c43487744.condition)
e1:SetTarget(c43487744.target)
e1:SetOperation(c43487744.activate)
c:RegisterEffect(e1)
end
function c43487744.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(53129443) and Duel.IsChainDisablable(ev)
end
function c43487744.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c43487744.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--城壁
function c44209392.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DEFCHANGE)
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(c44209392.condition)
e1:SetTarget(c44209392.target)
e1:SetOperation(c44209392.activate)
c:RegisterEffect(e1)
end
function c44209392.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c44209392.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c44209392.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_DEFENCE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(500)
tc:RegisterEffect(e1)
end
end
--タイム·イーター
function c44913552.initial_effect(c)
--skip draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(44913552,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c44913552.skipop)
c:RegisterEffect(e2)
end
function c44913552.skipop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCode(EFFECT_SKIP_M1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
--妖精王オベロン
function c45425051.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c45425051.con)
e1:SetTarget(c45425051.tg)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
e2:SetValue(500)
c:RegisterEffect(e2)
end
function c45425051.con(e)
return e:GetHandler():IsDefencePos()
end
function c45425051.tg(e,c)
return c:IsRace(RACE_PLANT)
end
--カラクリ蜘蛛
function c45688586.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45688586,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_END)
e1:SetTarget(c45688586.target)
e1:SetOperation(c45688586.operation)
c:RegisterEffect(e1)
end
function c45688586.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if chk==0 then return c==Duel.GetAttacker() and bc and bc:IsAttribute(ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c45688586.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
...@@ -28,19 +28,27 @@ function c49587034.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,19 +28,27 @@ function c49587034.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,4) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_OPPO_TURN,4)
e1:SetOperation(c49587034.tohand) e1:SetCondition(c49587034.thcon)
e1:SetOperation(c49587034.thop)
if cp~=e:GetHandlerPlayer() and ph~=PHASE_DRAW if cp~=e:GetHandlerPlayer() and ph~=PHASE_DRAW
then e1:SetLabel(2) then e1:SetLabel(2)
else e1:SetLabel(1) else e1:SetLabel(1)
end end
card:RegisterEffect(e1) card:RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c49587034[e:GetHandler()]=e1
end end
end end
function c49587034.tohand(e,tp,eg,ep,ev,re,r,rp) function c49587034.thcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return end return Duel.GetTurnPlayer()==tp
end
function c49587034.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct) e:GetOwner():SetTurnCounter(ct)
if ct==4 then if ct==4 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
else e:SetLabel(ct+1) end e:GetOwner():ResetFlagEffect(1082946)
else
e:SetLabel(ct+1)
end
end end
--サテライト·キャノン
function c50400231.initial_effect(c)
--ind
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(c50400231.indval)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50400231,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetCondition(c50400231.atkcon)
e2:SetOperation(c50400231.atkop)
c:RegisterEffect(e2)
--atk clear
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_END)
e3:SetOperation(c50400231.retop)
c:RegisterEffect(e3)
end
function c50400231.indval(e,c)
return c:IsLevelBelow(7)
end
function c50400231.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c50400231.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c50400231.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c==Duel.GetAttacker() then
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
end
end
--メタル·デビルゾア
function c50705071.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCondition(c50705071.spcon)
e1:SetOperation(c50705071.spop)
c:RegisterEffect(e1)
end
function c50705071.spfilter(c)
return c:IsCode(24311372) and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,68540058)
end
function c50705071.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(tp,c50705071.spfilter,1,nil)
end
function c50705071.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c50705071.spfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.ShuffleDeck(tp)
end
--魔法除去細菌兵器
function c54591086.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetLabel(0)
e1:SetCost(c54591086.cost)
e1:SetTarget(c54591086.target)
e1:SetOperation(c54591086.activate)
c:RegisterEffect(e1)
end
function c54591086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c54591086.rfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function c54591086.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c54591086.rfilter,1,nil)
end
local rg=Duel.SelectReleaseGroup(tp,c54591086.rfilter,1,5,nil)
e:SetLabel(rg:GetCount())
Duel.Release(rg,REASON_COST)
end
function c54591086.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function c54591086.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,c54591086.filter,1-tp,LOCATION_DECK,0,ct,ct,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
...@@ -39,11 +39,11 @@ function c54719828.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,11 +39,11 @@ function c54719828.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c54719828.aclimit1(e,re,tp) function c54719828.aclimit1(e,re,tp)
return re:GetHandler():IsType(TYPE_MONSTER) return re:IsActiveType(TYPE_MONSTER)
end end
function c54719828.aclimit2(e,re,tp) function c54719828.aclimit2(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_SPELL) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end end
function c54719828.aclimit3(e,re,tp) function c54719828.aclimit3(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_TRAP) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
end end
--マジック·ランプ
function c54912977.initial_effect(c)
--change target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54912977,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetCondition(c54912977.condition)
e1:SetTarget(c54912977.target)
e1:SetOperation(c54912977.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54912977,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c54912977.sptg)
e2:SetOperation(c54912977.spop)
c:RegisterEffect(e2)
end
function c54912977.condition(e,tp,eg,ep,ev,re,r,rp)
return r~=REASON_REPLACE and Duel.GetAttackTarget()==e:GetHandler() and Duel.GetAttacker():IsControler(1-tp)
and e:GetHandler():GetBattlePosition()==POS_FACEDOWN_DEFENCE
end
function c54912977.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,Duel.GetAttacker())
end
function c54912977.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.ChangeAttackTarget(tc)
end
end
function c54912977.spfilter(c,e,tp)
return c:IsCode(97590747) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c54912977.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c54912977.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c54912977.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c54912977.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -49,6 +49,17 @@ function c54974237.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,6 +49,17 @@ function c54974237.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabel(ty) e1:SetLabel(ty)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c54974237.turncon)
e2:SetOperation(c54974237.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c54974237[e:GetHandler()]=e2
end end
function c54974237.desop(e,tp,eg,ep,ev,re,r,rp) function c54974237.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end if ep==e:GetOwnerPlayer() then return end
...@@ -59,3 +70,16 @@ function c54974237.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,3 +70,16 @@ function c54974237.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(ep) Duel.ShuffleHand(ep)
end end
function c54974237.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c54974237.turnop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end
--グリフォンの翼
function c55608151.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c55608151.condition)
e1:SetTarget(c55608151.target)
e1:SetOperation(c55608151.activate)
c:RegisterEffect(e1)
end
function c55608151.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(18144506) and Duel.IsChainDisablable(ev)
end
function c55608151.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c55608151.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(c55608151.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c55608151.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
local g=Duel.GetMatchingGroup(c55608151.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--ファラオの審判
function c55948544.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55948544,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DRAW_PHASE)
e1:SetCondition(c55948544.condition1)
e1:SetCost(c55948544.cost)
e1:SetOperation(c55948544.operation1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55948544,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_DRAW_PHASE)
e2:SetCondition(c55948544.condition2)
e2:SetCost(c55948544.cost)
e2:SetOperation(c55948544.operation2)
c:RegisterEffect(e2)
end
function c55948544.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,81332143)
end
function c55948544.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c55948544.operation1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,81332143) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(0,1)
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=e1:Clone()
e4:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e4,tp)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_TURN_SET)
Duel.RegisterEffect(e5,tp)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetTargetRange(0,1)
e6:SetValue(c55948544.aclimit1)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
function c55948544.aclimit1(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c55948544.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,14731897)
end
function c55948544.operation2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,14731897) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetValue(c55948544.aclimit2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetTargetRange(0,LOCATION_SZONE)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetTarget(c55948544.distg)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
function c55948544.aclimit2(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c55948544.distg(e,c)
return c:IsType(TYPE_TRAP)
end
--万力魔神バイサー·デス
function c56043446.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56043446,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c56043446.target)
e1:SetOperation(c56043446.operation)
c:RegisterEffect(e1)
end
function c56043446.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c56043446.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCondition(c56043446.descon)
e1:SetOperation(c56043446.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetCondition(c56043446.rcon)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
c:RegisterEffect(e2)
end
end
function c56043446.rcon(e)
return e:GetHandler():GetFirstCardTarget()~=nil
end
function c56043446.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56043446.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if not tc then return end
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--万力魔神バイサー·デス
function c56043447.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56043447,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c56043447.target)
e1:SetOperation(c56043447.operation)
c:RegisterEffect(e1)
end
function c56043447.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c56043447.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCondition(c56043447.descon)
e1:SetOperation(c56043447.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetCondition(c56043447.rcon)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
c:RegisterEffect(e2)
end
end
function c56043447.rcon(e)
return e:GetHandler():GetFirstCardTarget()~=nil
end
function c56043447.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c56043447.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if not tc then return end
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(tc,REASON_EFFECT)
end
end
...@@ -45,6 +45,17 @@ function c57728570.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,17 @@ function c57728570.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c57728570.desop) e1:SetOperation(c57728570.desop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c57728570.turncon)
e2:SetOperation(c57728570.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c57728570[e:GetHandler()]=e2
end end
function c57728570.desop(e,tp,eg,ep,ev,re,r,rp) function c57728570.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end if ep==e:GetOwnerPlayer() then return end
...@@ -55,3 +66,16 @@ function c57728570.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,3 +66,16 @@ function c57728570.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(ep) Duel.ShuffleHand(ep)
end end
function c57728570.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c57728570.turnop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end
...@@ -45,6 +45,17 @@ function c57728571.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,17 @@ function c57728571.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c57728571.desop) e1:SetOperation(c57728571.desop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c57728571.turncon)
e2:SetOperation(c57728571.turnop)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e2,tp)
e2:SetLabelObject(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c57728571[e:GetHandler()]=e2
end end
function c57728571.desop(e,tp,eg,ep,ev,re,r,rp) function c57728571.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end if ep==e:GetOwnerPlayer() then return end
...@@ -55,3 +66,16 @@ function c57728571.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,3 +66,16 @@ function c57728571.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(ep) Duel.ShuffleHand(ep)
end end
function c57728571.turncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c57728571.turnop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetHandler():SetTurnCounter(ct)
if ct==3 then
e:GetLabelObject():Reset()
e:GetOwner():ResetFlagEffect(1082946)
end
end
--モウヤンのカレー
function c58074572.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c58074572.rectg)
e1:SetOperation(c58074572.recop)
c:RegisterEffect(e1)
end
function c58074572.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local opt=Duel.SelectOption(tp,aux.Stringid(58074572,0),aux.Stringid(58074572,1))
local p=(opt==0 and tp or 1-tp)
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(200)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,p,200)
end
function c58074572.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
...@@ -5,6 +5,7 @@ function c58775978.initial_effect(c) ...@@ -5,6 +5,7 @@ function c58775978.initial_effect(c)
e1:SetCategory(CATEGORY_POSITION) e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c58775978.target)
e1:SetOperation(c58775978.activate) e1:SetOperation(c58775978.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot attack --cannot attack
...@@ -19,26 +20,36 @@ function c58775978.initial_effect(c) ...@@ -19,26 +20,36 @@ function c58775978.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD) e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end
function c58775978.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
--destroy --destroy
local e4=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1) e1:SetCountLimit(1)
e4:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e4:SetOperation(c58775978.desop) e1:SetCondition(c58775978.descon)
c:RegisterEffect(e4) e1:SetOperation(c58775978.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,2)
c58775978[e:GetHandler()]=e1
end end
function c58775978.activate(e,tp,eg,ep,ev,re,r,rp) function c58775978.activate(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():SetTurnCounter(0) e:GetHandler():SetTurnCounter(0)
end end
function c58775978.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c58775978.desop(e,tp,eg,ep,ev,re,r,rp) function c58775978.desop(e,tp,eg,ep,ev,re,r,rp)
if tp==Duel.GetTurnPlayer() then return end
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetTurnCounter() local ct=c:GetTurnCounter()
ct=ct+1 ct=ct+1
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct==2 then if ct==2 then
Duel.Destroy(c,REASON_RULE) Duel.Destroy(c,REASON_RULE)
c:ResetFlagEffect(1082946)
end end
end end
--竜殺しの剣
function c61405855.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c61405855.target)
e1:SetOperation(c61405855.operation)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(700)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c61405855.eqlimit)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(61405855,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetCode(EVENT_BATTLED)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c61405855.descon)
e4:SetTarget(c61405855.destg)
e4:SetOperation(c61405855.desop)
c:RegisterEffect(e4)
end
function c61405855.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function c61405855.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function c61405855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c61405855.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c61405855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c61405855.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c61405855.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c61405855.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return bc and bc:IsRace(RACE_DRAGON)
end
function c61405855.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bc=e:GetHandler():GetEquipTarget():GetBattleTarget()
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function c61405855.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=Duel.GetFirstTarget()
if bc:IsRelateToEffect(e) then
Duel.Destroy(bc,REASON_EFFECT)
end
end
--イグザリオン·ユニバース
function c63749102.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63749102,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMING_BATTLE_PHASE)
e1:SetCondition(c63749102.atkcon)
e1:SetOperation(c63749102.atkop)
c:RegisterEffect(e1)
end
function c63749102.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget() and Duel.GetAttackTarget():IsDefencePos()
end
function c63749102.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-400)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
end
end
--レッドアイズ·ブラックメタルドラゴン
function c64335804.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCondition(c64335804.spcon)
e1:SetOperation(c64335804.spop)
c:RegisterEffect(e1)
end
function c64335804.spfilter(c)
return c:IsCode(74677422) and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,68540058)
end
function c64335804.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(tp,c64335804.spfilter,1,nil)
end
function c64335804.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c64335804.spfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.ShuffleDeck(tp)
end
--レッドアイズ·ブラックメタルドラゴン
function c64335805.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCondition(c64335805.spcon)
e1:SetOperation(c64335805.spop)
c:RegisterEffect(e1)
end
function c64335805.spfilter(c)
return c:IsCode(74677422) and c:GetEquipGroup():IsExists(Card.IsCode,1,nil,68540058)
end
function c64335805.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(tp,c64335805.spfilter,1,nil)
end
function c64335805.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c64335805.spfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.ShuffleDeck(tp)
end
--マシュマロンのメガネ
function c66865880.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:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c66865880.con)
e2:SetTarget(c66865880.target)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c66865880.cfilter(c)
return c:IsFaceup() and c:IsCode(31305911)
end
function c66865880.con(e)
return Duel.IsExistingMatchingCard(c66865880.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c66865880.target(e,c)
return c:IsFacedown() or c:GetCode()~=31305911
end
--魔術の呪文書
function c67227834.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c67227834.target)
e1:SetOperation(c67227834.operation)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(700)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c67227834.eqlimit)
c:RegisterEffect(e3)
--recover
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67227834,0))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c67227834.reccon)
e4:SetTarget(c67227834.rectg)
e4:SetOperation(c67227834.recop)
c:RegisterEffect(e4)
end
function c67227834.eqlimit(e,c)
local code=c:GetCode()
return code==46986414 or code==38033121
end
function c67227834.filter(c)
local code=c:GetCode()
return c:IsFaceup() and (code==46986414 or code==38033121)
end
function c67227834.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67227834.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67227834.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67227834.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c67227834.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c67227834.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c67227834.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c67227834.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--きまぐれの女神
function c67959180.initial_effect(c)
--dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67959180,0))
e1:SetCategory(CATEGORY_COIN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c67959180.target)
e1:SetOperation(c67959180.operation)
c:RegisterEffect(e1)
end
function c67959180.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function c67959180.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local opt=Duel.SelectOption(tp,60,61)
local coin=Duel.TossCoin(tp,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000)
if opt==coin then
e1:SetValue(c:GetAttack()/2)
else
e1:SetValue(c:GetAttack()*2)
end
c:RegisterEffect(e1)
end
end
--メタル化·魔法反射装甲
function c68540058.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c68540058.condition)
e1:SetTarget(c68540058.target)
e1:SetOperation(c68540058.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE_CALCULATING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c68540058.atkup)
c:RegisterEffect(e2)
end
function c68540058.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c68540058.filter(c)
return c:IsFaceup()
end
function c68540058.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c68540058.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68540058.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c68540058.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c68540058.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c68540058.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
end
end
function c68540058.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer()
end
function c68540058.atkup(e,tp,eg,ep,ev,re,r,rp)
local eqc=e:GetHandler():GetEquipTarget()
local bc=eqc:GetBattleTarget()
if eqc==Duel.GetAttacker() and bc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(bc:GetAttack()/2)
eqc:RegisterEffect(e1)
end
end
--メタル化·魔法反射装甲
function c68540059.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c68540059.condition)
e1:SetTarget(c68540059.target)
e1:SetOperation(c68540059.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE_CALCULATING)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c68540059.atkup)
c:RegisterEffect(e2)
end
function c68540059.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c68540059.filter(c)
return c:IsFaceup()
end
function c68540059.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c68540059.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68540059.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c68540059.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c68540059.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c68540059.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e3)
end
end
function c68540059.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer()
end
function c68540059.atkup(e,tp,eg,ep,ev,re,r,rp)
local eqc=e:GetHandler():GetEquipTarget()
local bc=eqc:GetBattleTarget()
if eqc==Duel.GetAttacker() and bc then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+RESET_DAMAGE_CAL)
e1:SetValue(bc:GetAttack()/2)
eqc:RegisterEffect(e1)
end
end
...@@ -20,21 +20,25 @@ function c72302403.initial_effect(c) ...@@ -20,21 +20,25 @@ function c72302403.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD) e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c72302403.desop)
c:RegisterEffect(e4)
end end
function c72302403.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72302403.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
e:GetHandler():SetTurnCounter(0) e:GetHandler():SetTurnCounter(0)
local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0)
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c72302403.descon)
e1:SetOperation(c72302403.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c72302403[e:GetHandler()]=e1
end end
function c72302403.activate(e,tp,eg,ep,ev,re,r,rp) function c72302403.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
...@@ -42,13 +46,16 @@ function c72302403.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,13 +46,16 @@ function c72302403.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(sg,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE) Duel.ChangePosition(sg,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENCE,POS_FACEUP_DEFENCE)
end end
end end
function c72302403.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c72302403.desop(e,tp,eg,ep,ev,re,r,rp) function c72302403.desop(e,tp,eg,ep,ev,re,r,rp)
if tp==Duel.GetTurnPlayer() then return end
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetTurnCounter() local ct=c:GetTurnCounter()
ct=ct+1 ct=ct+1
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct==3 then if ct==3 then
Duel.Destroy(c,REASON_RULE) Duel.Destroy(c,REASON_RULE)
c:ResetFlagEffect(1082946)
end end
end end
--闇の芸術家
function c72520073.initial_effect(c)
--defdown
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72520073,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(c72520073.defcon)
e1:SetOperation(c72520073.defop)
c:RegisterEffect(e1)
end
function c72520073.defcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c==Duel.GetAttackTarget() and bc:IsAttribute(ATTRIBUTE_LIGHT)
end
function c72520073.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENCE)
e1:SetValue(c:GetDefence()/2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
end
end
--ディメンション·ポッド
function c73414375.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73414375,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c73414375.target)
e1:SetOperation(c73414375.operation)
c:RegisterEffect(e1)
end
function c73414375.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return true end
local g=Group.CreateGroup()
if Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(73414375,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil)
g:Merge(rg)
end
if Duel.IsExistingTarget(Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(73414375,1)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local rg=Duel.SelectTarget(1-tp,Card.IsAbleToRemove,1-tp,0,LOCATION_GRAVE,1,3,nil)
g:Merge(rg)
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c73414375.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--デンジャラスマシン TYPE-6
function c76895648.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--dice
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76895648,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetCondition(c76895648.condition)
e2:SetTarget(c76895648.target)
e2:SetOperation(c76895648.operation)
c:RegisterEffect(e2)
end
function c76895648.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c76895648.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c76895648.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local dice=Duel.TossDice(tp,1)
if dice==1 then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
elseif dice==2 then
Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
elseif dice==3 then
Duel.Draw(tp,1,REASON_EFFECT)
elseif dice==4 then
Duel.Draw(1-tp,1,REASON_EFFECT)
elseif dice==5 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
else
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
--ゲルニア
function c77936940.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetOperation(c77936940.reg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77936940,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c77936940.spcon)
e2:SetTarget(c77936940.sptg)
e2:SetOperation(c77936940.spop)
c:RegisterEffect(e2)
end
function c77936940.reg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if bit.band(r,0x41)==0x41 and rp==1-tp and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP) then
c:RegisterFlagEffect(77936940,RESET_EVENT+0x1fe0000,0,1)
end
end
function c77936940.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetTurnID()~=Duel.GetTurnCount() and tp==Duel.GetTurnPlayer() and c:GetFlagEffect(77936940)>0
end
function c77936940.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c:ResetFlagEffect(77936940)
end
function c77936940.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--闇からの呼び声
function c78637313.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c78637313.adjustop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_CANNOT_SSET)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetTarget(c78637313.target)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetTargetRange(0,1)
e4:SetValue(c78637313.aclimit)
c:RegisterEffect(e4)
end
function c78637313.filter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 and c:GetReasonEffect()
and c:GetReasonEffect():GetHandler():IsCode(83764718)
end
function c78637313.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(c78637313.filter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.Readjust()
end
end
function c78637313.target(e,c)
return c:IsCode(83764718)
end
function c78637313.aclimit(e,re,tp)
return re:GetHandler():IsCode(83764718)
end
--電磁ミノ虫
function c7914843.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7914843,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c7914843.target)
e1:SetOperation(c7914843.operation)
c:RegisterEffect(e1)
--destroyed
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7914843,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetOperation(c7914843.desop)
c:RegisterEffect(e2)
end
function c7914843.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsControlerCanBeChanged()
end
function c7914843.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c7914843.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c7914843.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c7914843.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,PHASE_END+RESET_SELF_TURN,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function c7914843.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not bc:IsRelateToBattle() or bc:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-500)
bc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
bc:RegisterEffect(e2)
end
--デス·ヴォルストガルフ
function c81059524.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81059524,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c81059524.damcon)
e1:SetTarget(c81059524.damtg)
e1:SetOperation(c81059524.damop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c81059524.atkcon)
e2:SetOperation(c81059524.atkop)
c:RegisterEffect(e2)
end
function c81059524.damcon(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc:IsType(TYPE_MONSTER) and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c81059524.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c81059524.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
function c81059524.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tpe=re:GetActiveType()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and (tpe==TYPE_SPELL or tpe==TYPE_QUICKPLAY+TYPE_SPELL)
end
function c81059524.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
--友情 YU-JYO
function c81332143.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c81332143.activate)
c:RegisterEffect(e1)
end
function c81332143.activate(e,tp,eg,ep,ev,re,r,rp)
local opt=0
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_HAND,0,1,nil,14731897) and Duel.SelectYesNo(tp,aux.Stringid(81332143,2)) then
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_HAND,0,1,1,nil,14731897)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
opt=1
end
if opt==0 then
opt=Duel.SelectOption(1-tp,aux.Stringid(81332143,0),aux.Stringid(81332143,1))
else
opt=Duel.SelectOption(1-tp,aux.Stringid(81332143,0))
end
if opt==0 then
local lp=(Duel.GetLP(tp)+Duel.GetLP(1-tp))/2
Duel.SetLP(tp,lp)
Duel.SetLP(1-tp,lp)
end
end
--未熟な密偵
function c81820689.initial_effect(c)
--confirm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c81820689.cftg)
e1:SetOperation(c81820689.cfop)
c:RegisterEffect(e1)
end
function c81820689.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetTargetPlayer(tp)
end
function c81820689.cfop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(p,nil,p,0,LOCATION_HAND,1,1,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(p,g)
Duel.ShuffleHand(1-p)
end
end
--異国の剣士
function c85255550.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(85255550,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c85255550.condition)
e1:SetOperation(c85255550.operation)
c:RegisterEffect(e1)
end
function c85255550.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() and bc:IsFaceup()
end
function c85255550.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetOperation(c85255550.desop)
e1:SetLabel(0)
e1:SetOwnerPlayer(tp)
bc:RegisterEffect(e1)
end
end
function c85255550.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetOwner():SetTurnCounter(ct)
if ct==5 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
--ゾーン·イーター
function c86100785.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86100785,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c86100785.condition)
e1:SetOperation(c86100785.operation)
c:RegisterEffect(e1)
end
function c86100785.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle() and bc:IsFaceup()
end
function c86100785.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetOperation(c86100785.desop)
e1:SetLabel(0)
e1:SetOwnerPlayer(tp)
bc:RegisterEffect(e1)
end
end
function c86100785.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct+1
e:SetLabel(ct)
e:GetOwner():SetTurnCounter(ct)
if ct==5 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
--厳格な老魔術師
function c87557188.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c87557188.target)
e1:SetOperation(c87557188.activate)
c:RegisterEffect(e1)
end
function c87557188.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c87557188.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
end
end
--アクアの合唱
function c95132338.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:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c95132338.target)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3)
end
function c95132338.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c95132338.target(e,c)
return Duel.IsExistingMatchingCard(c95132338.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode())
end
...@@ -25,6 +25,8 @@ function c95308449.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,6 +25,8 @@ function c95308449.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c95308449.checkop) e1:SetOperation(c95308449.checkop)
e1:SetCountLimit(1) e1:SetCountLimit(1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END,0,20)
c95308449[c]=e1
end end
function c95308449.checkop(e,tp,eg,ep,ev,re,r,rp) function c95308449.checkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -33,5 +35,6 @@ function c95308449.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,5 +35,6 @@ function c95308449.checkop(e,tp,eg,ep,ev,re,r,rp)
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct==20 then if ct==20 then
Duel.Win(tp,0x11) Duel.Win(tp,0x11)
c:ResetFlagEffect(1082946)
end end
end end
--旧神の印
function c97809599.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c97809599.cost)
e1:SetTarget(c97809599.target)
e1:SetOperation(c97809599.activate)
c:RegisterEffect(e1)
end
function c97809599.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 c97809599.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
end
function c97809599.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
end
end
--覚醒
function c98374133.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c98374133.target)
e1:SetOperation(c98374133.operation)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(400)
c:RegisterEffect(e2)
--def down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENCE)
e3:SetValue(-200)
c:RegisterEffect(e3)
--equip limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c98374133.eqlimit)
c:RegisterEffect(e4)
end
function c98374133.eqlimit(e,c)
return c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98374133.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98374133.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98374133.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98374133.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c98374133.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c98374133.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--レジェンド·デビル
function c99747800.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99747800,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCondition(c99747800.atkcon)
e1:SetOperation(c99747800.atkop)
c:RegisterEffect(e1)
end
function c99747800.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c99747800.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(700)
c:RegisterEffect(e1)
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