Commit c7265715 authored by POLYMER's avatar POLYMER

fix

parent 36bf82fa
......@@ -101,15 +101,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.actcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not bit.band(r,REASON_EFFECT)~=0 then return false end
if bit.band(r,REASON_EFFECT)==0 then return false end
if not re then return false end
local rc=re:GetHandler()
return rc and s.CelestialBeing(rc)
end
function s.thfilter(c)
return s.CelestialBeing(c) and c:IsAbleToHand()
end
function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......@@ -117,7 +125,10 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -125,8 +136,8 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
local owner=c:GetOwner()
Duel.RegisterFlagEffect(owner,ArmedIntervention,0,0,0)
end
end
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
local s,id=GetID()
s.ui_hint_effect = s.ui_hint_effect or {}
local CORE_ID = 40020353
local ArmedIntervention = CORE_ID
local ArmedIntervention = CORE_ID
local ArmedIntervention_UI = CORE_ID + 10000
--CB
s.named_with_CelestialBeing=1
......@@ -40,7 +40,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,id)
e3:SetCountLimit(1,id+200)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
......@@ -183,5 +183,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
......@@ -5,17 +5,31 @@ function s.initial_effect(c)
--Fusion materials
c:EnableReviveLimit()
aux.AddFusionProcMixRep(c,true,true,s.matfilter,3,3)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetCondition(s.condition)
e0:SetOperation(s.regop)
c:RegisterEffect(e0)
--Special Summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,id)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(s.splimit)
c:RegisterEffect(e2)
--Cannot be Tributed
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......@@ -64,6 +78,16 @@ function s.initial_effect(c)
e10:SetOperation(s.negop)
c:RegisterEffect(e10)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) or c:GetFlagEffect(id)>0
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and Duel.GetFlagEffect(sp,id)==0
end
function s.matfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(5)
end
......@@ -93,6 +117,7 @@ end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
if not sg then return end
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD+RESET_PHASE+PHASE_END,0,1)
Duel.Release(sg,REASON_COST)
sg:DeleteGroup()
end
......
......@@ -149,7 +149,7 @@ function s.repop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:AddCounter(0x838,1)
end
......
......@@ -49,7 +49,7 @@ function s.matcheck(e,c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetValue(att)
e1:SetReset(RESETS_STANDARD_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,7 +35,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST)
end
function s.filter1(c,e)
return c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x838) and (not f or f(c))
......
......@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--Synchro Summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--Immune
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
......@@ -35,28 +35,32 @@ function s.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.discon)
e4:SetTarget(s.distg)
e4:SetOperation(s.disop)
c:RegisterEffect(e4)
--Banish FD
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_REMOVE)
local e5=e4:Clone()
e5:SetCondition(s.discon2)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(s.rmcon)
e5:SetTarget(s.rmtg)
e5:SetOperation(s.rmop)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
c:RegisterEffect(e5)
--Banish FD
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,2))
e6:SetCategory(CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(s.rmcon)
e6:SetTarget(s.rmtg)
e6:SetOperation(s.rmop)
c:RegisterEffect(e6)
--Global Check
if not s.global_check then
s.global_check=true
......@@ -103,10 +107,13 @@ function s.statcon(e)
return Duel.GetFlagEffect(0,id)>0
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x838) and c:GetCode()~=id
return c:IsFaceup() and c:IsSetCard(0x838)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function s.discon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and aux.NegateAnyFilter(chkc) 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