Commit 035487a0 authored by mercury233's avatar mercury233

fix

parent cab6cd49
--コンバット・ホイール
--Combat Wheel
--coded by CVen00/ToonyBirb using modified outline originally created by XGlitchy30, edited & formatted by Lyris
local s,id,o=GetID()
......@@ -62,27 +63,33 @@ function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=(Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,c):GetSum(Card.GetAttack))/2
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,c)
if c:IsFaceup() and c:IsRelateToEffect(e) and #g>0 then
local atk=g:GetSum(Card.GetAttack)/2
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atk)
c:RegisterEffect(e1)
Duel.BreakEffect()
if c:IsCanAddCounter(0x167,1) then c:AddCounter(0x167,1) end
end
local fid=0
if c:IsFaceup() and c:IsRelateToEffect(e) then
fid=c:GetFieldID()
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetLabel(fid)
e2:SetValue(s.atlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
if c:IsCanAddCounter(0x167,1) then c:AddCounter(0x167,1) end
end
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function s.atlimit(e,c)
return c~=e:GetHandler()
return c~=e:GetHandler() or e:GetHandler():GetFieldID()~=e:GetLabel()
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetCounter(0x167)>0 then
......
......@@ -47,6 +47,7 @@ function s.initial_effect(c)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
s.material_type=TYPE_FUSION+TYPE_SYNCHRO
function s.mfilter(typ)
return function(c)
return c:IsFusionSetCard(0x21) and c:IsFusionType(typ)
......
......@@ -24,24 +24,12 @@ function c100428022.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsSetCard(0x32) then
local b1=tc:GetLevel()>0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100428122,0,TYPES_TOKEN_MONSTER,1000,1000,1,RACE_PYRO,ATTRIBUTE_FIRE,POS_FACEUP,1-tp)
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(100428022,0)
opval[off]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(100428022,1)
opval[off]=2
off=off+1
end
ops[off]=aux.Stringid(100428022,2)
opval[off]=0
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
local sel=aux.SelectFromOptions(tp,
{b1,aux.Stringid(100428022,0)},
{b2,aux.Stringid(100428022,1)},
{true,aux.Stringid(100428022,2)})
if sel==1 then
Duel.BreakEffect()
local val=tc:GetLevel()*100
......
......@@ -110,6 +110,6 @@ function s.sspop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,false,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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