Commit fb7ab8fb authored by argon.sun's avatar argon.sun

new scripts

parent 9e563791
--ハチビー
function c1474910.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1474910,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c1474910.cost)
e1:SetTarget(c1474910.target)
e1:SetOperation(c1474910.operation)
c:RegisterEffect(e1)
end
function c1474910.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function c1474910.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleaseable() and Duel.CheckReleaseGroup(tp,c1474910.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,c1474910.cfilter,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Release(g,REASON_COST)
end
function c1474910.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c1474910.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 c1596508.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_GRAVE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_DECK,LOCATION_DECK)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DISCARD_DECK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end
...@@ -20,7 +20,7 @@ function c19353570.initial_effect(c) ...@@ -20,7 +20,7 @@ function c19353570.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c19353570.spcon(e,tp,eg,ep,ev,re,r,rp) function c19353570.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetLevel()==3 return rp==tp and eg:GetFirst():GetLevel()==3
end end
function c19353570.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19353570.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--ダーク·エルフ
function c21417692.initial_effect(c)
--attack cost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_COST)
e1:SetCost(c21417692.atcost)
e1:SetOperation(c21417692.atop)
c:RegisterEffect(e1)
end
function c21417692.atcost(e,c,tp)
return Duel.CheckLPCost(tp,1000)
end
function c21417692.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,1000)
end
--ワーム·ホール
function c22959079.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22959079.target)
e1:SetOperation(c22959079.operation)
c:RegisterEffect(e1)
end
function c22959079.filter(c)
return c:IsAbleToRemove()
end
function c22959079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22959079.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22959079.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c22959079.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c22959079.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local seq=tc:GetSequence()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c22959079.rtcon)
e1:SetOperation(c22959079.retop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE_FIELD)
e2:SetReset(RESET_PHASE+PHASE_DRAW,2)
e2:SetLabel(seq)
e2:SetLabelObject(tc)
e2:SetCondition(c22959079.discon)
e2:SetOperation(c22959079.disop)
Duel.RegisterEffect(e2,tp)
end
end
function c22959079.rtcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c22959079.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c22959079.discon(e,c)
if e:GetLabelObject():IsLocation(LOCATION_REMOVED) then return true end
return false
end
function c22959079.disop(e,tp)
local dis1=bit.lshift(0x1,e:GetLabel())
return dis1
end
--無差別破壊
function c32015116.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--roll and destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(32015116,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DICE)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c32015116.rdcon)
e2:SetTarget(c32015116.rdtg)
e2:SetOperation(c32015116.rdop)
c:RegisterEffect(e2)
end
function c32015116.rdcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c32015116.rdtg(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 c32015116.rdfilter(c,lv)
if lv<6 then
return c:IsFaceup() and c:IsDestructable() and c:GetLevel()==lv
else
return c:IsFaceup() and c:IsDestructable() and c:GetLevel()>=6 end
end
function c32015116.rdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local d1=Duel.TossDice(tp,1)
local g=Duel.GetMatchingGroup(c32015116.rdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,d1)
Duel.Destroy(g,REASON_EFFECT)
end
--エンペラー·オーダー
function c35011819.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c35011819.target1)
e1:SetOperation(c35011819.activate1)
c:RegisterEffect(e1)
--instant
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35011819,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c35011819.condition2)
e2:SetTarget(c35011819.target2)
e2:SetOperation(c35011819.activate2)
c:RegisterEffect(e2)
end
function c35011819.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(0)
local ct=Duel.GetCurrentChain()
if ct==1 then return end
local ct=Duel.GetCurrentChain()
local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
if te:GetCode()==EVENT_SUMMON_SUCCESS and te:IsActiveType(TYPE_MONSTER) and Duel.IsChainInactivatable(ct-1)
and Duel.IsPlayerCanDraw(tc:GetControler(),1) and Duel.SelectYesNo(tp,aux.Stringid(35011819,1)) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,tc,1,0,0)
Duel.SetTargetPlayer(tc:GetControler())
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tc:GetControler(),1)
end
end
function c35011819.activate1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()~=1 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
Duel.NegateActivation(ct-1)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c35011819.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetCode()==EVENT_SUMMON_SUCCESS and Duel.IsChainInactivatable(ev)
end
function c35011819.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(rp,1) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetTargetPlayer(rp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,rp,1)
end
function c35011819.activate2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.NegateActivation(ev)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--トリプル·ヴァイパー
function c37869028.initial_effect(c)
--multiattack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(2)
c:RegisterEffect(e1)
--attack cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_COST)
e2:SetCost(c37869028.atcost)
e2:SetOperation(c37869028.atop)
c:RegisterEffect(e2)
end
function c37869028.atcost(e,c,tp)
return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_AQUA)
end
function c37869028.atop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_AQUA)
Duel.Release(g,REASON_COST)
end
--ニードル·ウォール
function c38299233.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e1)
--roll and destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38299233,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_REPEAT)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c38299233.rdcon)
e2:SetTarget(c38299233.rdtg)
e2:SetOperation(c38299233.rdop)
c:RegisterEffect(e2)
end
function c38299233.rdcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c38299233.rdtg(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 c38299233.rdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local d1=6
while d1==6 do
d1=Duel.TossDice(tp,1)
end
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,d1-1)
if tc then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--砂漠の守護者
function c38981606.initial_effect(c)
--defup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_DEFENCE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c38981606.val)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c38981606.destg)
e2:SetValue(c38981606.value)
e2:SetOperation(c38981606.desop)
c:RegisterEffect(e2)
end
function c38981606.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)*300
end
function c38981606.dfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_INSECT)
and not c:IsReason(REASON_REPLACE) and c:IsControler(tp)
end
function c38981606.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not eg:IsContains(e:GetHandler())
and eg:IsExists(c38981606.dfilter,1,nil,tp) end
if Duel.SelectYesNo(tp,aux.Stringid(38981606,0)) then
return true
else return false end
end
function c38981606.value(e,c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_INSECT)
and not c:IsReason(REASON_REPLACE) and c:IsControler(e:GetHandlerPlayer())
end
function c38981606.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
--魂を喰らう者 バズー
function c40133511.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40133511,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c40133511.cost)
e1:SetOperation(c40133511.operation)
c:RegisterEffect(e1)
end
function c40133511.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c40133511.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40133511.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cg=Duel.SelectMatchingCard(tp,c40133511.cfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.Remove(cg,POS_FACEUP,REASON_COST)
e:SetLabel(cg:GetCount())
end
function c40133511.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local count=e:GetLabel()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(count*300)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
end
end
--ツイン·ブレイカー
function c40225398.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetOperation(c40225398.caop)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
end
function c40225398.caop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if Duel.GetAttacker()==c and bc and bit.band(bc:GetBattlePosition(),POS_DEFENCE)~=0 and c:IsRelateToBattle() and c:IsChainAttackable()
and Duel.SelectYesNo(tp,aux.Stringid(40225398,0)) then
Duel.ChainAttack()
end
end
--ドレインシールド
function c43250041.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c43250041.condition)
e1:SetTarget(c43250041.target)
e1:SetOperation(c43250041.activate)
c:RegisterEffect(e1)
end
function c43250041.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c43250041.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
local rec=tg:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,rec)
end
function c43250041.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then
if Duel.NegateAttack(tc) then
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end
end
end
--エメス,ザ,インフィニティ
function c43580269.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43580269,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(c43580269.atcon)
e1:SetOperation(c43580269.atop)
c:RegisterEffect(e1)
end
function c43580269.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c43580269.atop(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(700)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
--ムカムカ
function c46657337.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c46657337.val)
c:RegisterEffect(e1)
--defup
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
function c46657337.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*300
end
--カオスライダー グスタフ
function c47829960.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47829960,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c47829960.target)
e1:SetOperation(c47829960.operation)
c:RegisterEffect(e1)
end
function c47829960.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c47829960.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c47829960.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47829960.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c47829960.filter,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c47829960.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local count=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
if count>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(count*300)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
end
end
--黄泉へ渡る船
function c51534754.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(51534754,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c51534754.condition)
e1:SetTarget(c51534754.target)
e1:SetOperation(c51534754.operation)
c:RegisterEffect(e1)
end
function c51534754.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
and e:GetHandler():GetReasonCard():IsRelateToBattle()
end
function c51534754.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local rc=e:GetHandler():GetReasonCard()
Duel.SetTargetCard(rc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,rc,1,0,0)
end
function c51534754.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
...@@ -33,7 +33,6 @@ function c61127349.initial_effect(c) ...@@ -33,7 +33,6 @@ function c61127349.initial_effect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD) e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetOperation(c61127349.rmop) e5:SetOperation(c61127349.rmop)
e5:SetLabelObject(e1)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c61127349.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61127349.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -41,23 +40,18 @@ function c61127349.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,23 +40,18 @@ function c61127349.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(nil)
end end
function c61127349.operation(e,tp,eg,ep,ev,re,r,rp) function c61127349.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.Equip(tp,c,tc) then Duel.Equip(tp,c,tc)
tc:CreateRelation(c,RESET_EVENT+0x1fe0000)
e:SetLabelObject(tc)
end
end end
end end
function c61127349.rmop(e,tp,eg,ep,ev,re,r,rp,chk) function c61127349.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(c:GetPreviousPosition(),POS_FACEDOWN)~=0 then return end local tc=e:GetHandler():GetEquipTarget()
local tc=e:GetLabelObject():GetLabelObject() if tc then
if tc:IsRelateToCard(c) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
--トルネード·バード
function c71283180.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71283180,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c71283180.target)
e1:SetOperation(c71283180.operation)
c:RegisterEffect(e1)
end
function c71283180.filter(c,e)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end
function c71283180.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c71283180.filter(chkc) end
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c71283180.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e)
if g:GetCount()<2 then
g:Clear()
Duel.SetTargetCard(g)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:Select(tp,2,2,nil)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,2,0,0)
end
function c71283180.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg then return end
local dg=tg:Filter(Card.IsRelateToEffect,nil,e)
if dg:GetCount()==2 then
Duel.SendtoHand(dg,nil,REASON_EFFECT)
end
end
--クロスソード·ハンター
function c74976215.initial_effect(c)
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PIERCE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c74976215.condition)
e1:SetTarget(c74976215.target)
c:RegisterEffect(e1)
end
function c74976215.filter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function c74976215.condition(e)
return Duel.IsExistingMatchingCard(c74976215.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c74976215.target(e,c)
return c:IsRace(RACE_INSECT)
end
--スキヤナー
function c75198893.initial_effect(c)
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75198893,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c75198893.target)
e1:SetOperation(c75198893.operation)
c:RegisterEffect(e1)
end
function c75198893.filter(c)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_XYZ) and not c:IsHasEffect(EFFECT_FORBIDDEN)
end
function c75198893.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(1-tp) and c75198893.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c75198893.filter,tp,0,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.SelectTarget(tp,c75198893.filter,tp,0,LOCATION_REMOVED,1,1,nil)
end
function c75198893.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetOriginalCode()
local ba=tc:GetBaseAttack()
local bd=tc:GetBaseDefence()
local at=tc:GetAttribute()
local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(ba)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENCE)
e3:SetValue(bd)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(at)
c:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_LEVEL)
e5:SetValue(lv)
c:RegisterEffect(e5)
--leave redir
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetReset(RESET_EVENT+0x47e0000+RESET_PHASE+RESET_END)
e6:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e6)
end
end
--巨大戦艦 ビッグ·コアMk-II
function c75937826.initial_effect(c)
--spsummon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75937826,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c75937826.addct)
e1:SetOperation(c75937826.addc)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75937826,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c75937826.rctcon)
e3:SetOperation(c75937826.rctop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75937826,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c75937826.descon)
e4:SetTarget(c75937826.destg)
e4:SetOperation(c75937826.desop)
c:RegisterEffect(e4)
--summon with no tribute
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(75937826,3))
e5:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SUMMON_PROC)
e5:SetCondition(c75937826.ntcon)
c:RegisterEffect(e5)
end
function c75937826.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1f)
end
function c75937826.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1f,3)
end
end
function c75937826.rctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)~=0
end
function c75937826.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end
end
function c75937826.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0
end
function c75937826.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c75937826.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c75937826.ntcon(e,c)
if c==nil then return true end
return c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
end
--ライフ·コーディネイター
function c76214441.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76214441,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c76214441.discon)
e1:SetCost(c76214441.discost)
e1:SetTarget(c76214441.distg)
e1:SetOperation(c76214441.disop)
c:RegisterEffect(e1)
end
function c76214441.discon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainInactivatable(ev) then return false end
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE)
if ex then return true end
ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_RECOVER)
return ex and ((cp~=PLAYER_ALL and Duel.IsPlayerAffectedByEffect(cp,EFFECT_REVERSE_RECOVER)) or
(cp==PLAYER_ALL and (Duel.IsPlayerAffectedByEffect(0,EFFECT_REVERSE_RECOVER) or Duel.IsPlayerAffectedByEffect(1,EFFECT_REVERSE_RECOVER))))
end
function c76214441.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c76214441.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c76214441.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--ダーク·リペアラー
function c76614003.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76614003,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c76614003.condition)
e1:SetOperation(c76614003.operation)
c:RegisterEffect(e1)
end
function c76614003.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():GetPreviousControler()==tp
end
function c76614003.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(76614003,1),aux.Stringid(76614003,2))
if opt==1 then
Duel.MoveSequence(tc,opt)
end
end
--爆風トカゲ
function c77491079.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77491079,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetTarget(c77491079.target)
e1:SetOperation(c77491079.operation)
c:RegisterEffect(e1)
end
function c77491079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()~=tp and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c77491079.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
...@@ -11,7 +11,7 @@ function c84847656.initial_effect(c) ...@@ -11,7 +11,7 @@ function c84847656.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c84847656.dfilter(c) function c84847656.dfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHO) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHO) and not c:IsReason(REASON_REPLACE)
end end
function c84847656.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c84847656.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not eg:IsContains(e:GetHandler()) if chk==0 then return not eg:IsContains(e:GetHandler())
...@@ -22,7 +22,7 @@ function c84847656.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,7 @@ function c84847656.destg(e,tp,eg,ep,ev,re,r,rp,chk)
else return false end else return false end
end end
function c84847656.value(e,c) function c84847656.value(e,c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHO) return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRace(RACE_PSYCHO) and not c:IsReason(REASON_REPLACE)
end end
function c84847656.desop(e,tp,eg,ep,ev,re,r,rp) function c84847656.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
......
--激昂のムカムカ
function c91862578.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c91862578.val)
c:RegisterEffect(e1)
--defup
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
function c91862578.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*400
end
--マハー·ヴァイロ
function c93013676.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c93013676.val)
c:RegisterEffect(e1)
end
function c93013676.val(e,c)
return c:GetEquipCount()*500
end
--プリベント·スター
function c94303232.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(c94303232.target)
e1:SetOperation(c94303232.operation)
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(c94303232.eqlimit)
c:RegisterEffect(e2)
--Remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(94303232,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c94303232.rmcon)
e3:SetTarget(c94303232.rmtg)
e3:SetOperation(c94303232.rmop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
if not c94303232.global_check then
c94303232.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHANGE_POS)
ge1:SetOperation(c94303232.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c94303232.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsPreviousPosition(POS_FACEUP_ATTACK) and tc:IsPosition(POS_FACEUP_DEFENCE) then
tc:RegisterFlagEffect(94303232,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
function c94303232.eqlimit(e,c)
return c:GetFlagEffect(94303232)~=0 or c:GetFlagEffect(94303233)~=0
end
function c94303232.filter(c)
return c:IsFaceup() and c:GetFlagEffect(94303232)~=0
end
function c94303232.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c94303232.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c94303232.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g:GetFirst())
end
function c94303232.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if dc==tc then tc=g:GetNext() end
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if Duel.Equip(tp,c,tc) and dc:IsRelateToEffect(e) then
tc:RegisterFlagEffect(94303233,RESET_EVENT+0x1fe0000,0,1)
c:SetCardTarget(dc)
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_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c94303232.rcon)
dc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_ATTACK)
dc:RegisterEffect(e2,true)
end
end
end
function c94303232.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c94303232.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsReason(REASON_DESTROY)
and c:IsHasCardTarget(e:GetLabelObject():GetLabelObject())
end
function c94303232.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetLabelObject():GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c94303232.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
...@@ -20,7 +20,13 @@ function c9748752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,7 +20,13 @@ function c9748752.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) local tc=g:GetFirst()
if tc then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
if tc:IsFaceup() and tc:IsAttribute(ATTRIBUTE_DARK) then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
end
end end
function c9748752.operation(e,tp,eg,ep,ev,re,r,rp) function c9748752.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -394,3 +394,4 @@ ...@@ -394,3 +394,4 @@
!counter 0x1c D指示物 !counter 0x1c D指示物
!counter 0x1d 废品指示物 !counter 0x1d 废品指示物
!counter 0x1e 门指示物 !counter 0x1e 门指示物
!counter 0x1f 指示物(巨大战舰)
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