Commit e632ddc0 authored by mercury233's avatar mercury233 Committed by GitHub

update 神秘の中華なべ

parent 2c45db84
...@@ -11,21 +11,30 @@ function c80161395.initial_effect(c) ...@@ -11,21 +11,30 @@ function c80161395.initial_effect(c)
e1:SetOperation(c80161395.activate) e1:SetOperation(c80161395.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c80161395.filter(c,tp)
return (c:GetAttack()>0 or c:GetDefense()>0) and (c:IsControler(tp) or c:IsFaceup())
end
function c80161395.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c80161395.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,c80161395.filter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,nil,1,1,nil) local sg=Duel.SelectReleaseGroup(tp,c80161395.filter,1,1,nil,tp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
local atk=tc:GetAttack() local atk=tc:GetAttack()
local def=tc:GetDefense() local def=tc:GetDefense()
local isdef=tc:IsDefenseAbove(0)
Duel.Release(tc,REASON_COST) Duel.Release(tc,REASON_COST)
local sel=0
if isdef then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(80161395,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(80161395,0))
sel=Duel.SelectOption(tp,aux.Stringid(80161395,1),aux.Stringid(80161395,2)) if atk>0 and def>0 then
if Duel.SelectOption(tp,aux.Stringid(80161395,1),aux.Stringid(80161395,2))==0 then
e:SetLabel(atk)
else
e:SetLabel(def)
end
elseif atk>0 then
Duel.SelectOption(tp,aux.Stringid(80161395,1))
e:SetLabel(atk)
else
Duel.SelectOption(tp,aux.Stringid(80161395,2))
e:SetLabel(def)
end end
if sel==0 then e:SetLabel(atk)
else e:SetLabel(def) end
end end
function c80161395.target(e,tp,eg,ep,ev,re,r,rp,chk) function c80161395.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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