Commit 9ae9bb4a authored by argon.sun's avatar argon.sun

new scripts

parent 12b0852b
--連爆魔人
function c11685347.initial_effect(c)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c11685347.chop)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11685347,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11685347.damcon)
e2:SetTarget(c11685347.damtg)
e2:SetOperation(c11685347.damop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c11685347.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==1 then
e:SetLabel(0)
elseif re:IsHasType(EFFECT_TYPE_ACTIVATE) then
e:SetLabel(1)
end
end
function c11685347.damcon(e,tp,eg,ep,ev,re,r,rp)
local res=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
return res==1
end
function c11685347.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 c11685347.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 c12694768.initial_effect(c)
--battle destroyed
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12694768,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c12694768.condition)
e1:SetTarget(c12694768.target)
e1:SetOperation(c12694768.operation)
c:RegisterEffect(e1)
end
function c12694768.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c12694768.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,500)
end
function c12694768.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,500,REASON_EFFECT)
Duel.Recover(1-tp,500,REASON_EFFECT)
end
--化石発掘
function c23869735.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c23869735.cost)
e1:SetTarget(c23869735.target)
e1:SetOperation(c23869735.operation)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c23869735.desop)
c:RegisterEffect(e2)
--Destroy2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c23869735.descon2)
e3:SetOperation(c23869735.desop2)
c:RegisterEffect(e3)
end
function c23869735.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c23869735.filter(c,e,tp)
return c:IsRace(RACE_DINOSAUR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23869735.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23869735.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c23869735.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c23869735.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c23869735.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
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
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_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c23869735.rcon)
tc:RegisterEffect(e1,true)
end
end
function c23869735.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c23869735.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c23869735.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY)
end
function c23869735.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
......@@ -17,6 +17,7 @@ function c24857466.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24857466,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_END)
......
--奇跡の蘇生
function c37011715.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c37011715.condition)
e1:SetTarget(c37011715.target)
e1:SetOperation(c37011715.activate)
c:RegisterEffect(e1)
end
function c37011715.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>2 and Duel.CheckChainUniqueness()
end
function c37011715.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c37011715.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c37011715.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c37011715.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c37011715.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c37011715.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--突撃ライノス
function c3784434.initial_effect(c)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3784434,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c3784434.seqcon)
e1:SetOperation(c3784434.seqop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c3784434.atkcon)
e2:SetValue(500)
c:RegisterEffect(e2)
end
function c3784434.seqcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
function c3784434.seqop(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.bor(flag,bit.lshift(0x1,seq-1)) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.bor(flag,bit.lshift(0x1,seq+1)) end
flag=bit.bxor(flag,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0
if s==1 then nseq=0
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
Duel.MoveSequence(e:GetHandler(),nseq)
end
end
function c3784434.dircon(e,tp)
local seq=4-e:GetHandler():GetSequence()
return Duel.GetFieldCard(e:GetOwnerPlayer(),LOCATION_MZONE,seq)==nil
and Duel.GetFieldCard(e:GetOwnerPlayer(),LOCATION_SZONE,seq)==nil
end
function c3784434.atkcon(e)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()~=nil
and e:GetHandler():GetSequence()+Duel.GetAttackTarget():GetSequence()==4
end
--コンボマスター
function c44800181.initial_effect(c)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c44800181.chop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetCondition(c44800181.atkcon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c44800181.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()>1
and e:GetHandler():GetFlagEffect(44800181)==0 then
e:GetHandler():RegisterFlagEffect(44800181,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c44800181.atkcon(e)
return e:GetHandler():GetFlagEffect(44800181)~=0
end
--ライトニングパニッシャー
function c45023678.initial_effect(c)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c45023678.chop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45023678,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CHAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c45023678.descon)
e2:SetTarget(c45023678.destg)
e2:SetOperation(c45023678.desop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c45023678.chop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct==1 then
e:SetLabel(0)
elseif not Duel.CheckChainUniqueness() then
e:SetLabel(2)
elseif re:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=2 then
e:SetLabel(1)
end
end
function c45023678.descon(e,tp,eg,ep,ev,re,r,rp)
local res=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
return res==1
end
function c45023678.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c45023678.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--フレイム·オーガ
function c58098303.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(58098303,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c58098303.target)
e2:SetOperation(c58098303.operation)
c:RegisterEffect(e2)
end
function c58098303.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c58098303.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--洗脳光線
function c59258334.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c59258334.target)
e1:SetOperation(c59258334.operation)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c59258334.descon)
c:RegisterEffect(e2)
--destroy2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c59258334.descon2)
e3:SetOperation(c59258334.desop2)
c:RegisterEffect(e3)
--remove counter
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c59258334.rccon)
e4:SetOperation(c59258334.rcop)
c:RegisterEffect(e4)
end
function c59258334.filter(c)
return c:GetCounter(0xe)>0 and c:IsControlerCanBeChanged()
end
function c59258334.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 c59258334.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c59258334.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c59258334.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c59258334.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:GetCounter(0xe)>0 and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE)
e1:SetRange(LOCATION_MZONE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(tp)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetCondition(c59258334.con)
tc:RegisterEffect(e1)
end
end
function c59258334.con(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c59258334.descon(e)
local c=e:GetHandler()
if c:GetCardTargetCount()==0 then return false end
return c:GetFirstCardTarget():GetCounter(0xe)==0
end
function c59258334.descon2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc) and tc:IsReason(REASON_DESTROY)
end
function c59258334.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c59258334.rccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFirstCardTarget()
end
function c59258334.rcop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
tc:RemoveCounter(tp,0xe,1,REASON_EFFECT)
end
--サイバー·サモン·ブラスター
function c63477921.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63477921,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c63477921.damcon)
e2:SetTarget(c63477921.damtg)
e2:SetOperation(c63477921.damop)
c:RegisterEffect(e2)
end
function c63477921.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c63477921.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c63477921.filter,1,nil)
end
function c63477921.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function c63477921.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--一陣の風
function c63516460.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c63516460.condition)
e1:SetTarget(c63516460.target)
e1:SetOperation(c63516460.activate)
c:RegisterEffect(e1)
end
function c63516460.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()>1 and Duel.CheckChainUniqueness()
end
function c63516460.filter(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c63516460.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c63516460.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c63516460.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c63516460.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c63516460.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--獣人アレス
function c71395725.initial_effect(c)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c71395725.chop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c71395725.atkcon)
e2:SetOperation(c71395725.atkop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c71395725.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==1 then
e:SetLabel(0)
elseif re:IsHasType(EFFECT_TYPE_ACTIVATE) then
e:SetLabel(1)
end
end
function c71395725.atkcon(e,tp,eg,ep,ev,re,r,rp)
local res=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
return res==1
end
function c71395725.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
--女王親衛隊
function c71411377.initial_effect(c)
--at limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetTarget(c71411377.atlimit)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function c71411377.atlimit(e,c)
local code=c:GetCode()
return code==87257460 or code==23756165 or code==50140163
end
--迷走悪魔
function c86209650.initial_effect(c)
--battle destroyed
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86209650,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c86209650.condition)
e1:SetTarget(c86209650.target)
e1:SetOperation(c86209650.operation)
c:RegisterEffect(e1)
end
function c86209650.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c86209650.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,800)
end
function c86209650.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,800,REASON_EFFECT)
Duel.Recover(1-tp,800,REASON_EFFECT)
end
--m˰
function c86742443.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE)
e1:SetCondition(c86742443.condition)
e1:SetTarget(c86742443.target)
e1:SetOperation(c86742443.operation)
c:RegisterEffect(e1)
end
function c86742443.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()~=tp
end
function c86742443.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end
end
function c86742443.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then return end
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0):RandomSelect(tp,1)
local tc=g:GetFirst()
Duel.ConfirmCards(tp,tc)
Duel.ShuffleHand(1-tp)
local code=tc:GetCode()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c86742443.damop)
e1:SetLabel(0)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c86742443.damop2)
e2:SetLabelObject(e1)
e2:SetLabel(code)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetOperation(c86742443.damop3)
e3:SetLabelObject(e1)
e3:SetLabel(code)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
end
function c86742443.damop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
function c86742443.damop2(e,tp,eg,ep,ev,re,r,rp)
if eg:GetFirst():GetCode()==e:GetLabel() then
Duel.Damage(tp,1000,REASON_EFFECT)
e:GetLabelObject():SetLabel(1)
end
end
function c86742443.damop3(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():GetCode()==e:GetLabel() then
Duel.Damage(tp,1000,REASON_EFFECT)
e:GetLabelObject():SetLabel(1)
end
end
--コンボファイター
function c8806072.initial_effect(c)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c8806072.chop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetCondition(c8806072.atkcon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c8806072.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()>1
and e:GetHandler():GetFlagEffect(8806072)==0 then
e:GetHandler():RegisterFlagEffect(8806072,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c8806072.atkcon(e)
return e:GetHandler():GetFlagEffect(8806072)~=0
end
......@@ -20,16 +20,16 @@ end
function c88301833.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:GetFirst():GetSummonType()==SUMMON_TYPE_RITUAL
end
function c88301833.thfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()
function c88301833.thfilter(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) and c:IsAbleToHand()
end
function c88301833.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=eg:GetFirst()
local mat=tc:GetMaterial()
local mat=tc:GetMaterial()i
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and mat:IsContains(chkc) end
if chk==0 then return mat:IsExists(c88301833.thfilter,1,nil) end
if chk==0 then return mat:IsExists(c88301833.thfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=mat:FilterSelect(tp,c88301833.thfilter,1,1,nil)
local g=mat:FilterSelect(tp,c88301833.thfilter,1,1,nil,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
......
--サイバー·エスパー
function c91663373.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(91663373,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DRAW)
e1:SetCondition(c91663373.cfcon)
e1:SetOperation(c91663373.cfop)
Duel.RegisterEffect(e1,tp)
end
function c91663373.cfcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos() and ep==1-tp
end
function c91663373.filter(c)
return c:IsLocation(LOCATION_HAND) and not c:IsPublic()
end
function c91663373.cfop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsPosition(POS_FACEUP_ATTACK) then
local cg=eg:Filter(c91663373.filter,nil)
Duel.ConfirmCards(tp,cg)
Duel.ShuffleHand(1-tp)
end
end
--地母神アイリス
function c9628664.initial_effect(c)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c9628664.chop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9628664,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9628664.drcon)
e2:SetTarget(c9628664.drtg)
e2:SetOperation(c9628664.drop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c9628664.chop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct==1 then
e:SetLabel(0)
elseif not Duel.CheckChainUniqueness() then
e:SetLabel(2)
elseif re:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetLabel()~=2 then
e:SetLabel(1)
end
end
function c9628664.drcon(e,tp,eg,ep,ev,re,r,rp)
local res=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
return res==1
end
function c9628664.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c9628664.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
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