Commit a912762e authored by Huangnan's avatar Huangnan

fix

parent b7cbcfc7
--囮物语·神抚子 --囮物语·神抚子
function c1009011.initial_effect(c) function c1009011.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),2,4) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),2,4)
c:EnableReviveLimit() c:EnableReviveLimit()
--indes --indes
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--damage val --damage val
local e5=e3:Clone() local e5=e3:Clone()
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1009011,0)) e1:SetDescription(aux.Stringid(1009011,0))
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c1009011.cost) e1:SetCost(c1009011.cost)
e1:SetTarget(c1009011.target) e1:SetTarget(c1009011.target)
e1:SetOperation(c1009011.operation) e1:SetOperation(c1009011.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon bgm --spsummon bgm
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS) e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c1009011.sumsuc) e8:SetOperation(c1009011.sumsuc)
c:RegisterEffect(e8) c:RegisterEffect(e8)
local e9=e8:Clone() local e9=e8:Clone()
e9:SetCode(EVENT_SUMMON_SUCCESS) e9:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e9) c:RegisterEffect(e9)
end end
function c1009011.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c1009011.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1009011,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(1009011,0))
end end
function c1009011.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c1009011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c1009011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c1009011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end end
function c1009011.operation(e,tp,eg,ep,ev,re,r,rp) function c1009011.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsPreviousLocation(LOCATION_MZONE) then if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsPreviousLocation(LOCATION_MZONE) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
if atk<0 then atk=0 end if atk<0 then atk=0 end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end end
--究极白蛇神·神抚子 --究极白蛇神·神抚子
function c1009014.initial_effect(c) function c1009014.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),1,6) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_REPTILE),1,6)
c:EnableReviveLimit() c:EnableReviveLimit()
--indes --indes
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--damage val --damage val
local e5=e3:Clone() local e5=e3:Clone()
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--immune --immune
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
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) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1009014.efilter) e3:SetValue(c1009014.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1009014,1)) e2:SetDescription(aux.Stringid(1009014,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c1009014.spcost) e2:SetCost(c1009014.spcost)
e2:SetTarget(c1009014.target) e2:SetTarget(c1009014.target)
e2:SetOperation(c1009014.operation) e2:SetOperation(c1009014.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon bgm --spsummon bgm
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS) e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c1009014.sumsuc) e8:SetOperation(c1009014.sumsuc)
c:RegisterEffect(e8) c:RegisterEffect(e8)
local e9=e8:Clone() local e9=e8:Clone()
e9:SetCode(EVENT_SUMMON_SUCCESS) e9:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e9) c:RegisterEffect(e9)
end end
function c1009014.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c1009014.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(1009014,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(1009014,0))
end end
function c1009014.efilter(e,te) function c1009014.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
end end
function c1009014.filter(c,e,sp) function c1009014.filter(c,e,sp)
return c:IsAttackBelow(3000) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsAttackBelow(3000) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function c1009014.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c1009014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c1009014.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1009014.target(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
and Duel.IsExistingMatchingCard(c1009014.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c1009014.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA)
end
function c1009014.gfilter(c,rank)
return c:IsRank(rank)
end end
function c1009014.operation(e,tp,eg,ep,ev,re,r,rp) function c1009014.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c1009014.filter,tp,LOCATION_EXTRA,0,nil,e,tp) local tg=Duel.GetMatchingGroup(c1009014.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 then return end if ft<=0 or tg:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
end local g=tg:Select(tp,ft,ft,nil)
Duel.SpecialSummonComplete() local c=e:GetHandler()
end local tc=g:GetFirst()
function c1009014.descon2(e,tp,eg,ep,ev,re,r,rp) while tc do
local d=Duel.GetAttackTarget() Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if d==e:GetHandler() then d=Duel.GetAttacker() end end
e:SetLabelObject(d) Duel.SpecialSummonComplete()
return d~=nil
end
function c1009014.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local d=e:GetLabelObject()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,d,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,d:GetBaseAttack())
end end
function c1009014.desop2(e,tp,eg,ep,ev,re,r,rp)
local d=e:GetLabelObject()
local dam=d:GetBaseAttack()
if d:IsRelateToBattle() and Duel.Destroy(d,REASON_EFFECT)~=0 and dam>0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
\ No newline at end of file
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