Commit a3f06c5b authored by POLYMER's avatar POLYMER

fix

parent 7aeab020
......@@ -82,12 +82,9 @@ function c12869020.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,sump,false,false,POS_FACEUP,sel_zone)
end
function c12869020.efilter(e,te)
local c=e:GetHandler()
local c=e:GetHandler()
local ec=te:GetHandler()
if te:GetOwner()==e:GetOwner() then return false end
if ec:IsHasCardTarget(c) or (te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)) then return false
end
return true
return not (ec:IsHasCardTarget(c) or te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te) or ec==c)
end
function c12869020.costfilter(c)
return c:IsSetCard(0x6a70) and c:IsType(TYPE_MONSTER) and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
......
......@@ -73,6 +73,7 @@ function c12869030.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c12869030.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
e:Reset()
end
function c12869030.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -71,6 +71,7 @@ function c12869035.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
e:Reset()
end
function c12869035.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -60,12 +60,25 @@ function c12869040.indop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE+TIMING_STANDBY_PHASE+TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1)
e1:SetTarget(aux.nbtg)
e1:SetTarget(c12869040.target)
e1:SetCondition(c12869040.condition)
e1:SetOperation(c12869040.op)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c12869040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Auxiliary.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
if re:GetActivateLocation()==LOCATION_GRAVE then
e:SetCategory(e:GetCategory()|CATEGORY_GRAVE_ACTION)
else
e:SetCategory(e:GetCategory()&~CATEGORY_GRAVE_ACTION)
end
e:Reset()
end
function c12869040.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
......
......@@ -25,6 +25,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
......
--激奏的古之钥 白濑咲耶
function c28318627.initial_effect(c)
--antica spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28318627,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetTarget(c28318627.sptg)
e1:SetOperation(c28318627.spop)
c:RegisterEffect(e1)
--fusion summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28318627,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_DRAW_PHASE)
e2:SetTarget(c28318627.fstg)
e2:SetOperation(c28318627.fsop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28318627,2))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c28318627.spcon)
e3:SetTarget(c28318627.sptg2)
e3:SetOperation(c28318627.spop2)
c:RegisterEffect(e3)
end
function c28318627.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
if Duel.GetLP(tp)>3000 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,2000)
end
Duel.SetChainLimit(c28318627.limit(e:GetHandler()))
end
function c28318627.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
function c28318627.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if Duel.GetLP(tp)>3000 then
Duel.Damage(tp,2000,REASON_EFFECT)
end
end
function c28318627.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsSetCard(0x285)
end
function c28318627.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_FAIRY) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c28318627.fstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c28318627.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(c28318627.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c28318627.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(c28318627.limit(e:GetHandler()))
end
function c28318627.fsop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c28318627.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c28318627.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c28318627.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
if Duel.GetLP(tp)>3000 then
Duel.Damage(tp,2000,REASON_EFFECT)
end
end
function c28318627.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonPlayer,1,nil,tp)
end
function c28318627.spfilter(c,e,tp)
return c:IsSetCard(0x285) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
end
function c28318627.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c28318627.spop2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
if Duel.GetLP(tp)<=3000 and Duel.IsExistingMatchingCard(c28318627.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(28317560,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28318627.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......@@ -40,7 +40,7 @@ function s.initial_effect(c)
c:RegisterEffect(e4)
end
function s.mfilter(c,e,tp)
return c:IsAttack(0) and Duel.GetCurrentPhase()==PHASE_MAIN1 and tp==Duel.GetTurnPlayer()
return c:IsAttack(0) and c:IsFaceup() and Duel.GetCurrentPhase()==PHASE_MAIN1 and tp==Duel.GetTurnPlayer()
end
function s.altop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 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