Commit c8dced56 authored by salix5's avatar salix5 Committed by GitHub

fix 魅惑の宮殿, 魅惑の舞 (#2594)

* fix 魅惑の宮殿

* fix 魅惑の舞
parent 56e4527d
......@@ -51,9 +51,9 @@ function s.costfilter(c,code)
return c:GetFlagEffect(code)~=0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local qg=e:GetHandler():GetEquipGroup()
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and qg:IsExists(s.costfilter,1,nil,e:GetHandler():GetCode()) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) end
Duel.SendtoGrave(c,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.atktg)
e2:SetValue(s.val)
c:RegisterEffect(e2)
--spsummon
......@@ -46,11 +47,16 @@ function s.atkfilter(c,code)
return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER
and c:GetFlagEffect(code)~=0
end
function s.atktg(e,c)
return c:IsSetCard(0x3)
end
function s.val(e,c)
local g=c:GetEquipGroup():Filter(s.atkfilter,nil,c:GetCode())
local g=c:GetEquipGroup():Filter(s.atkfilter,nil,FLAG_ID_ALLURE_QUEEN)
if g:GetCount()>0 then
return g:GetSum(Card.GetBaseAttack)
else return 0 end
else
return 0
end
end
function s.spcfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
......
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