Commit 035487a0 authored by mercury233's avatar mercury233

fix

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