Commit fe906eb0 authored by wind2009's avatar wind2009

Fix 亜空間バトル

parent f9469ef2
Pipeline #42645 passed with stages
in 4 minutes and 21 seconds
...@@ -13,7 +13,7 @@ function s.initial_effect(c) ...@@ -13,7 +13,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.dfilter(c) function s.dfilter(c)
return c:GetTextAttack()>=0 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:GetTextAttack()>=0 and c:IsType(TYPE_MONSTER)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.dfilter,tp,LOCATION_DECK,0,1,nil)
...@@ -50,13 +50,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,13 +50,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabel(tc2:GetCode()) e2:SetLabel(tc2:GetCode())
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
if tc1:GetAttack()>tc2:GetAttack() then if tc1:GetAttack()>tc2:GetAttack() then
Duel.SendtoHand(tc1,nil,REASON_EFFECT) if tc1:IsAbleToHand() then
Duel.ConfirmCards(1-tp,tc1) Duel.SendtoHand(tc1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc1)
else
Duel.SendtoGrave(tc1,REASON_RULE)
end
Duel.Destroy(tc2,REASON_EFFECT) Duel.Destroy(tc2,REASON_EFFECT)
Duel.Damage(1-tp,500,REASON_EFFECT) Duel.Damage(1-tp,500,REASON_EFFECT)
elseif tc1:GetAttack()<tc2:GetAttack() then elseif tc1:GetAttack()<tc2:GetAttack() then
Duel.SendtoHand(tc2,nil,REASON_EFFECT) if tc2:IsAbleToHand() then
Duel.ConfirmCards(tp,tc2) Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(tp,tc2)
else
Duel.SendtoGrave(tc2,REASON_RULE)
end
Duel.Destroy(tc1,REASON_EFFECT) Duel.Destroy(tc1,REASON_EFFECT)
Duel.Damage(tp,500,REASON_EFFECT) Duel.Damage(tp,500,REASON_EFFECT)
end 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