Commit 7954ecd8 authored by Tachibana's avatar Tachibana

E

parent 0a78939f
...@@ -3,7 +3,7 @@ local m=10702121 ...@@ -3,7 +3,7 @@ local m=10702121
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,cm.ffilter1,cm.ffilter2,2,true) aux.AddFusionProcFunFun(c,cm.ffilter1,cm.ffilter2,2,true)
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
...@@ -30,30 +30,30 @@ function cm.initial_effect(c) ...@@ -30,30 +30,30 @@ function cm.initial_effect(c)
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e6:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND) e6:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O) e6:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e6:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e6:SetCountLimit(1,m)
e1:SetCountLimit(1,m) e6:SetTarget(cm.thtg)
e1:SetTarget(cm.thtg) e6:SetOperation(cm.thop)
e1:SetOperation(cm.thop) c:RegisterEffect(e6)
c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(80312545,0)) e7:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e7:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e7:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e7:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCost(cm.spcost) e7:SetCountLimit(1)
e2:SetTarget(cm.sptg) e7:SetCost(cm.spcost)
e2:SetOperation(cm.spop) e7:SetTarget(cm.sptg)
c:RegisterEffect(e2) e7:SetOperation(cm.spop)
c:RegisterEffect(e7)
end end
function cm.ffilter1(c) function cm.ffilter1(c)
return c:IsLevelAbove(7) and c:IsFusionAttribute(ATTRIBUTE_LIGHT) and c:IsFusionSetCard(0x482) return c:IsLevelAbove(7) and c:IsFusionAttribute(ATTRIBUTE_LIGHT) and c:IsFusionSetCard(0x482)
...@@ -73,18 +73,19 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -73,18 +73,19 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and (chkc:IsOnField() or chkc:IsLocation(LOCATION_GRAVE)) and cm.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and (chkc:IsOnField() or chkc:IsLocation(LOCATION_GRAVE)) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
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 tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
local c=e:GetHandler()
--immune --immune
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0)) e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter) e3:SetValue(cm.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
...@@ -114,14 +115,16 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -114,14 +115,16 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst() local tc=g:GetFirst()
--splimit --splimit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(cm.splimitcost) e2:SetCost(cm.splimitcost)
e2:SetOperation(cm.splimitop) e2:SetOperation(cm.splimitop)
c:RegisterEffect(e2) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end end
end end
function cm.cfilter(c) function cm.cfilter(c)
...@@ -135,7 +138,7 @@ function cm.splimitcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -135,7 +138,7 @@ function cm.splimitcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.splimitop(e,tp,eg,ep,ev,re,r,rp) function cm.splimitop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel() local count=e:GetLabel()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
...@@ -15,10 +15,11 @@ function cm.initial_effect(c) ...@@ -15,10 +15,11 @@ function cm.initial_effect(c)
--SpecialSummon or tohand --SpecialSummon or tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCost(aux.bfgcost)
e3:SetCondition(cm.recon2) e3:SetCondition(cm.recon2)
e3:SetTarget(cm.retg2) e3:SetTarget(cm.retg2)
e3:SetOperation(cm.reop2) e3:SetOperation(cm.reop2)
...@@ -35,7 +36,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +36,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsSetCard(0x12e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x482) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.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
...@@ -52,8 +53,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +53,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
--SpecialSummon or tohand --SpecialSummon or tohand
function cm.cfilter2(c,tp) function cm.cfilter2(c,tp)
return c:IsSetCard(0x482) and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) return c:IsSetCard(0x482) and c:IsReason(REASON_DESTROY) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end end
function cm.recon2(e,tp,eg,ep,ev,re,r,rp) function cm.recon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,1,nil,tp) return eg:IsExists(cm.cfilter2,1,nil,tp)
...@@ -73,12 +74,12 @@ function cm.reop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,12 +74,12 @@ function cm.reop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
local a=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 local a=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b=tc:IsAbleToHand() local b=tc:IsAbleToHand()
local op=-1 local op=-1
if a and b then op=Duel.SelectOption(tp,aux.Stringid(id,0),aux.Stringid(id,1)) if a and b then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b then op=Duel.SelectOption(tp,aux.Stringid(id,0)) elseif a then op=Duel.SelectOption(tp,aux.Stringid(m,1))
elseif a then op=Duel.SelectOption(tp,aux.Stringid(id,1))+1 elseif b then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
else return end else return end
if op==0 then if op==0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
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