Commit 2f01bafa authored by wind2009's avatar wind2009

Fix 冥帝王エイドス

parent 2f5b1c8e
...@@ -35,7 +35,7 @@ function s.initial_effect(c) ...@@ -35,7 +35,7 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0xbe) and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsType(TYPE_MONSTER) and c:GetAttack()==2800 and c:GetDefense()==1000) return c:IsSetCard(0xbe) and (c:IsType(TYPE_SPELL+TYPE_TRAP) or c:IsType(TYPE_MONSTER) and c:IsAttack(2800) and c:IsDefense(1000))
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
...@@ -50,27 +50,36 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,27 +50,36 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local att=0
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(mg) do
att=att|(ATTRIBUTE_ALL&~tc:GetAttribute())
end
if chk==0 then return att>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local att=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL) local aatt=Duel.AnnounceAttribute(tp,1,att)
e:SetLabel(att) e:SetLabel(aatt)
end end
function s.ctop(e,tp,eg,ep,ev,re,r,rp) function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst() local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsFaceup,Card.IsNonAttribute),tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,att)
if tc then if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(e:GetLabel()) e1:SetValue(att)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return tc:IsSummonPlayer(tp) and tc:IsSummonType(SUMMON_TYPE_ADVANCE) return tc:IsSummonPlayer(tp) and tc:IsSummonType(SUMMON_TYPE_ADVANCE)
and tc:GetAttack()>=2400 and tc:GetDefense()==1000 and tc:IsAttackAbove(2400) and tc:IsDefense(1000)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -82,8 +91,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,8 +91,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local b1=c:IsAbleToHand() local b1=c:IsAbleToHand()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1152}) local op=aux.SelectFromOptions(tp,{b1,1190,1},{b2,1152,2})
if op==1 then if op==1 then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
......
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