Commit 5d667bfc authored by wind2009's avatar wind2009

Merge branch 'master' into mc_master

parents 41bf9cd3 2bf900bb
Pipeline #37593 failed with stages
...@@ -85,37 +85,38 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,37 +85,38 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if not tc then return end if tc then
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
aux.FCheckAdditional=s.fcheck1(ct) aux.FCheckAdditional=s.fcheck1(ct)
aux.FGoalCheckAdditional=s.fcheck2 aux.FGoalCheckAdditional=s.fcheck2
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
aux.FGoalCheckAdditional=nil aux.FGoalCheckAdditional=nil
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_EXTRA) local rg=mat1:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
mat1:Sub(rg) mat1:Sub(rg)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
elseif ce then elseif ce then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
local exmat=tc:GetMaterial():Filter(Card.IsPreviousLocation,nil,LOCATION_EXTRA) local exmat=tc:GetMaterial():Filter(Card.IsPreviousLocation,nil,LOCATION_EXTRA)
if #exmat>0 then if #exmat>0 then
local dam=exmat:GetSum(Card.GetAttack) local dam=exmat:GetSum(Card.GetAttack)
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
if lp>=dam then if lp>=dam then
Duel.SetLP(tp,lp-dam) Duel.SetLP(tp,lp-dam)
else else
Duel.SetLP(tp,0) Duel.SetLP(tp,0)
end
end end
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
end end
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
aux.FGoalCheckAdditional=nil aux.FGoalCheckAdditional=nil
end end
...@@ -54,7 +54,7 @@ function s.cfilter2(c) ...@@ -54,7 +54,7 @@ function s.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT) return c:IsType(TYPE_MONSTER) and c:IsReason(REASON_EFFECT)
end end
function s.lpcon(e,tp,eg,ep,ev,re,r,rp) function s.lpcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsAllTypes(TYPE_RITUAL+TYPE_MONSTER) return re and re:GetHandler():IsAllTypes(TYPE_RITUAL+TYPE_MONSTER)
and eg:IsExists(s.cfilter2,1,nil) and eg:IsExists(s.cfilter2,1,nil)
end end
function s.lpop(e,tp,eg,ep,ev,re,r,rp) function s.lpop(e,tp,eg,ep,ev,re,r,rp)
......
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