Commit 794321dc authored by TanakaKotoha's avatar TanakaKotoha

ready for new cards

parent 7f984893
......@@ -108,3 +108,67 @@ end
function Tenka.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--
function Tenka.Arisa(c)
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_IMMUNE_EFFECT)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Tenka.iscon)
ea:SetValue(Tenka.esfilter)
c:RegisterEffect(ea)
local eb=Effect.CreateEffect(c)
eb:SetDescription(aux.Stringid(81013038,0))
eb:SetType(EFFECT_TYPE_IGNITION)
eb:SetProperty(EFFECT_FLAG_CARD_TARGET)
eb:SetRange(LOCATION_MZONE)
eb:SetCountLimit(1)
eb:SetTarget(Tenka.mvtg)
eb:SetOperation(Tenka.mvop)
c:RegisterEffect(eb)
end
function Tenka.iscon(e)
local seq=e:GetHandler():GetSequence()
return seq==0 or seq==4
end
function Tenka.esfilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function Tenka.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(81013038,2))
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end
function Tenka.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
--
function Tenka.ArisaB(c)
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_IMMUNE_EFFECT)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Tenka.iscon)
ea:SetValue(Tenka.esfilter)
c:RegisterEffect(ea)
local eb=Effect.CreateEffect(c)
eb:SetDescription(aux.Stringid(81013038,0))
eb:SetType(EFFECT_TYPE_QUICK_O)
eb:SetCode(EVENT_FREE_CHAIN)
eb:SetProperty(EFFECT_FLAG_CARD_TARGET)
eb:SetRange(LOCATION_MZONE)
eb:SetCountLimit(1)
eb:SetTarget(Tenka.mvtg)
eb:SetOperation(Tenka.mvop)
c:RegisterEffect(eb)
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