Commit 185a0192 authored by TanakaKotoha's avatar TanakaKotoha

iidx gooooooooooooooooooold

parent cdf880bc
...@@ -64,13 +64,12 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -64,13 +64,12 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(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 Duel.Destroy(c,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
......
...@@ -32,6 +32,10 @@ function cm.initial_effect(c) ...@@ -32,6 +32,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
cm.is_named_with_Ma_Elf=1 cm.is_named_with_Ma_Elf=1
function cm.IsMa_Elf(c)
local m=_G["c"..c:GetCode()]
return m and m.is_named_with_Ma_Elf and c:IsType(TYPE_PENDULUM)
end
function cm.lcheck(g,lc) function cm.lcheck(g,lc)
return g:IsExists(cm.IsMa_Elf,1,nil) return g:IsExists(cm.IsMa_Elf,1,nil)
end end
......
--五河士道 守护 --五河士道 守护
function c33401312.initial_effect(c) function c33401312.initial_effect(c)
--inm --atk & def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetDescription(aux.Stringid(33401312,0))
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCountLimit(1,33401312) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetTarget(c33401312.target) e1:SetRange(LOCATION_HAND)
e1:SetOperation(c33401312.activate) e1:SetCountLimit(1,33411312)
e1:SetCondition(c33401312.atkcon)
e1:SetTarget(c33401312.atktg)
e1:SetOperation(c33401312.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -20,44 +23,47 @@ function c33401312.initial_effect(c) ...@@ -20,44 +23,47 @@ function c33401312.initial_effect(c)
e2:SetOperation(c33401312.repop) e2:SetOperation(c33401312.repop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33401312.filter(c) function c33401312.atkcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsSetCard(0x341) return Duel.GetAttackTarget()
and (Duel.GetAttacker():IsControler(tp) and Duel.GetAttacker():IsSetCard(0x341)
or Duel.GetAttackTarget():IsControler(tp) and Duel.GetAttackTarget():IsSetCard(0x341))
end end
function c33401312.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33401312.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c33401312.filter,tp,LOCATION_MZONE,0,1,nil) end local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33401312,0)) if chk==0 then
local g=Duel.SelectTarget(tp,c33401312.filter,tp,LOCATION_MZONE,0,1,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c33401312.activate(e,tp,eg,ep,ev,re,r,rp) function c33401312.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local c=e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then local a=Duel.GetAttacker()
local e3=Effect.CreateEffect(e:GetHandler()) local d=a:GetBattleTarget()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
a:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetValue(1)
e3:SetRange(LOCATION_MZONE) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
e3:SetValue(c33401312.efilter) d:RegisterEffect(e3)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
e3:SetOwnerPlayer(tp) Duel.BreakEffect()
tc:RegisterEffect(e3) local cp=Duel.GetTurnPlayer()
local e1=Effect.CreateEffect(e:GetHandler()) Duel.SkipPhase(cp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetCountLimit(1)
e1:SetValue(c33401312.indct)
tc:RegisterEffect(e1)
end end
end end
function c33401312.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c33401312.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
function c33401312.repfilter(c,tp) function c33401312.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x341) or c:IsSetCard(0xa342) return c:IsFaceup() and c:IsSetCard(0x341) or c:IsSetCard(0xa342)
......
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