Commit 4f26bcbf authored by Nemo Ma's avatar Nemo Ma

fix

parent 2f244980
......@@ -9,31 +9,30 @@ function c79034048.initial_effect(c)
e1:SetCondition(c79034048.accon)
e1:SetOperation(c79034048.activate)
c:RegisterEffect(e1)
--Special Summon
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_FZONE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCountLimit(1,79034048999)
e5:SetCost(c79034048.spcost)
e5:SetTarget(c79034048.sptg)
e5:SetOperation(c79034048.spop)
c:RegisterEffect(e5)
--set
--Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4230620,0))
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,7903404899999)
e2:SetCondition(c79034048.atkcon)
e2:SetTarget(c79034048.atktg)
e2:SetOperation(c79034048.atkop)
c:RegisterEffect(e2)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,09034048)
e2:SetCost(c79034048.spcost)
e2:SetTarget(c79034048.sptg)
e2:SetOperation(c79034048.spop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,19034048)
e3:SetCondition(c79034048.atkcon)
e3:SetTarget(c79034048.atktg)
e3:SetOperation(c79034048.atkop)
c:RegisterEffect(e3)
end
function c79034048.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa007) and c:IsAbleToHand()
......@@ -55,18 +54,25 @@ function c79034048.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000)
end
function c79034048.spfilter4(c,e,tp)
return c:IsSetCard(0xa007) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0xa007) and c:IsSummonable(true,nil) or c:IsMSetable(true,nil)
end
function c79034048.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.IsExistingMatchingCard(c79034048.spfilter4,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c79034048.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c79034048.spfilter4,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c79034048.spfilter4,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil)
local s2=tc:IsMSetable(true,nil)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil)
else
Duel.MSet(tp,tc,true,nil)
end
end
end
function c79034048.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -5,7 +5,7 @@ function c79034055.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,79034048)
e1:SetCountLimit(1,79034055)
e1:SetCondition(c79034055.accon)
e1:SetOperation(c79034055.activate)
c:RegisterEffect(e1)
......@@ -15,7 +15,7 @@ function c79034055.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,7903404899)
e2:SetCountLimit(1,09034055)
e2:SetCost(c79034055.aucost)
e2:SetTarget(c79034055.autg)
e2:SetOperation(c79034055.auop)
......@@ -26,7 +26,7 @@ function c79034055.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,790340489999)
e3:SetCountLimit(1,19034055)
e3:SetCost(c79034055.aucost)
e3:SetTarget(c79034055.tgtg)
e3:SetOperation(c79034055.tgop)
......@@ -36,6 +36,7 @@ function c79034055.thfilter(c)
return c:IsSetCard(0xa007) and c:IsAbleToHand()
end
function c79034055.accon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
local g=Duel.GetMatchingGroup(c79034055.thfilter,tp,LOCATION_DECK,0,nil)
return g:GetCount()>0
end
......
......@@ -18,6 +18,8 @@ function c79034057.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,19034057)
e1:SetCondition(aux.exccon)
e1:SetCost(c79034057.drcost)
e1:SetTarget(c79034057.target1)
e1:SetOperation(c79034057.activate1)
......@@ -53,11 +55,12 @@ function c79034057.drcost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c79034057.cofil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c79034057.cofil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c79034057.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c79034057.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(c79034057.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,nil) and aux.exccon() end
and Duel.IsExistingTarget(c79034057.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c79034057.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
......
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