Commit 069b84bb authored by TanakaKotoha's avatar TanakaKotoha

fix 2

parent f79b8f58
This diff is collapsed.
...@@ -9,8 +9,8 @@ function c47530042.initial_effect(c) ...@@ -9,8 +9,8 @@ function c47530042.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,47530042) e1:SetCountLimit(1,47530042)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c47530042.sptg) e1:SetTarget(c47530042.rbtg)
e1:SetOperation(c47530042.spop) e1:SetOperation(c47530042.rbop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,9 +21,14 @@ function c47530042.initial_effect(c) ...@@ -21,9 +21,14 @@ function c47530042.initial_effect(c)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,47530043) e2:SetCountLimit(1,47530043)
e2:SetCondition(c47530042.rtcon) e2:SetCondition(c47530042.rtcon)
e2:SetCost(c47530042.cost)
e2:SetTarget(c47530042.rttg) e2:SetTarget(c47530042.rttg)
e2:SetOperation(c47530042.rtop) e2:SetOperation(c47530042.rtop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(47530042,ACTIVITY_SPSUMMON,c47530042.counterfilter)
end
function c47530042.counterfilter(c)
return c:IsRace(RACE_MACHINE)
end end
function c47530042.condition(e,tp,eg,ep,ev,re,r,rp) function c47530042.condition(e,tp,eg,ep,ev,re,r,rp)
local c=eg:GetFirst() local c=eg:GetFirst()
...@@ -53,17 +58,6 @@ function c47530042.rbop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,17 +58,6 @@ function c47530042.rbop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTargetRange(1,0)
e3:SetTarget(c47530042.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c47530042.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end end
function c47530042.cfilter(c,tp) function c47530042.cfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsPreviousLocation(LOCATION_ONFIELD) return c:IsRace(RACE_MACHINE) and c:IsPreviousLocation(LOCATION_ONFIELD)
...@@ -71,6 +65,21 @@ end ...@@ -71,6 +65,21 @@ end
function c47530042.rtcon(e,tp,eg,ep,ev,re,r,rp) function c47530042.rtcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47530042.cfilter,1,nil,tp) return eg:IsExists(c47530042.cfilter,1,nil,tp)
end end
function c47530042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(47530042,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c47530042.splimit)
Duel.RegisterEffect(e1,tp)
end
function c47530042.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_MACHINE)
end
function c47530042.rttg(e,tp,eg,ep,ev,re,r,rp,chk) function c47530042.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c47530042.cfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return eg:IsExists(c47530042.cfilter,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
...@@ -88,12 +97,4 @@ function c47530042.rtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,12 +97,4 @@ function c47530042.rtop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTargetRange(1,0)
e3:SetTarget(c47530042.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end end
\ No newline at end of file
...@@ -12,16 +12,18 @@ function c66915005.initial_effect(c) ...@@ -12,16 +12,18 @@ function c66915005.initial_effect(c)
e22:SetCode(EFFECT_IMMUNE_EFFECT) e22:SetCode(EFFECT_IMMUNE_EFFECT)
e22:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e22:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e22:SetRange(LOCATION_MZONE) e22:SetRange(LOCATION_MZONE)
e22:SetCondition(c66915005.conditions)
e22:SetValue(c66915005.efilter) e22:SetValue(c66915005.efilter)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c66915005.eftg) e5:SetTarget(c66915005.eftg)
e5:SetLabelObject(e22) e5:SetLabelObject(e22)
c:RegisterEffect(e5)
--Activate --Activate
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK+CATEGORY_DESTROY) e11:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e11:SetType(EFFECT_TYPE_QUICK_O) e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetCode(EVENT_CHAINING) e11:SetCode(EVENT_CHAINING)
e11:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e11:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
...@@ -29,12 +31,13 @@ function c66915005.initial_effect(c) ...@@ -29,12 +31,13 @@ function c66915005.initial_effect(c)
e11:SetCondition(c66915005.condition) e11:SetCondition(c66915005.condition)
e11:SetTarget(c66915005.target) e11:SetTarget(c66915005.target)
e11:SetOperation(c66915005.activate) e11:SetOperation(c66915005.activate)
local e5=Effect.CreateEffect(c) local e55=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e55:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE) e55:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e55:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c66915005.eftg) e55:SetTarget(c66915005.eftg)
e5:SetLabelObject(e11) e55:SetLabelObject(e11)
c:RegisterEffect(e55)
--spsummon limit --spsummon limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -45,6 +48,12 @@ function c66915005.initial_effect(c) ...@@ -45,6 +48,12 @@ function c66915005.initial_effect(c)
e2:SetTarget(c66915005.sumlimit) e2:SetTarget(c66915005.sumlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c66915005.cfilters(c)
return c:IsFaceup() and c:IsCode(66915001)
end
function c66915005.conditions(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c66915005.cfilters,tp,LOCATION_SZONE,0,1,nil)
end
function c66915005.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c66915005.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374)
end end
...@@ -53,28 +62,30 @@ function c66915005.eftg(e,c) ...@@ -53,28 +62,30 @@ function c66915005.eftg(e,c)
return c:IsSetCard(0x1374) return c:IsSetCard(0x1374)
and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)==0 and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)==0
end end
function c66915005.tgtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsType(TYPE_EFFECT) and c:IsSetCard(0x1374)
end
function c66915005.efilter(e,re,tp) function c66915005.efilter(e,re,tp)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer() return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end end
function c66915005.cfilter(c) function c66915005.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS+TYPE_SPELL) return c:IsFaceup() and c:IsSetCard(0x374) and c:IsType(TYPE_CONTINUOUS+TYPE_SPELL)
end end
function c66915005.cfilterss(c)
return c:IsFaceup() and c:IsCode(66915001) and c:IsAbleToHand()
end
function c66915005.condition(e,tp,eg,ep,ev,re,r,rp) function c66915005.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c57831349.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c66915005.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c66915005.cfilterss,tp,LOCATION_ONFIELD,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end end
function c66915005.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66915005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return
Duel.GetFlagEffect(tp,60018643)==0 end
Duel.RegisterFlagEffect(tp,60018643,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end end
end end
function c66915005.desfilter(c) function c66915005.desfilter(c)
return c:IsFaceup() and c:IsCode(66915001) return c:IsFaceup() and c:IsCode(66915001) and c:IsAbleToHand()
end end
function c66915005.activate(e,tp,eg,ep,ev,re,r,rp) function c66915005.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler() local ec=re:GetHandler()
......
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