Commit 484d9807 authored by Fluorohydride's avatar Fluorohydride

Merge pull request #395 from VanillaSalt/patch50

fix
parents 0f235550 61af9b0c
...@@ -23,6 +23,7 @@ function c11501629.initial_effect(c) ...@@ -23,6 +23,7 @@ function c11501629.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c11501629.damcon)
e2:SetCost(c11501629.damcost) e2:SetCost(c11501629.damcost)
e2:SetTarget(c11501629.damtg) e2:SetTarget(c11501629.damtg)
e2:SetOperation(c11501629.damop) e2:SetOperation(c11501629.damop)
...@@ -39,6 +40,9 @@ end ...@@ -39,6 +40,9 @@ end
function c11501629.ctop(e,tp,eg,ep,ev,re,r,rp) function c11501629.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x2d,e:GetLabel()) e:GetHandler():AddCounter(0x2d,e:GetLabel())
end end
function c11501629.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY
end
function c11501629.damcost(e,tp,eg,ep,ev,re,r,rp,chk) function c11501629.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
e:SetLabel(e:GetHandler():GetCounter(0x2d)) e:SetLabel(e:GetHandler():GetCounter(0x2d))
......
...@@ -15,14 +15,16 @@ function c21223277.initial_effect(c) ...@@ -15,14 +15,16 @@ function c21223277.initial_effect(c)
e1:SetOperation(c21223277.operation) e1:SetOperation(c21223277.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21223277,1)) e2:SetDescription(aux.Stringid(21223277,1))
e1:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e1:SetCost(c21223277.cost) e2:SetRange(LOCATION_MZONE)
e1:SetTarget(c21223277.target) e2:SetCountLimit(1)
e1:SetOperation(c21223277.operation) e2:SetCost(c21223277.descost)
c:RegisterEffect(e1) e2:SetTarget(c21223277.destg)
e2:SetOperation(c21223277.desop)
c:RegisterEffect(e2)
end end
function c21223277.condition(e,tp,eg,ep,ev,re,r,rp) function c21223277.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
...@@ -30,26 +32,23 @@ end ...@@ -30,26 +32,23 @@ end
function c21223277.filter(c,e,tp,ec) function c21223277.filter(c,e,tp,ec)
return c:IsSetCard(0x207a) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec) return c:IsSetCard(0x207a) and c:IsCanBeEffectTarget(e) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec)
end end
function c21223277.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c21223277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21223277.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATIOIN_GRAVE) and c21223277.filter(chkc,e,tp,e:GetHandler()) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c21223277.filter(chkc,e,tp,e:GetHandler()) end
if chk==0 then if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
return Duel.IsExistingMatchingCard(c21223277.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) return Duel.IsExistingMatchingCard(c21223277.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler())
end end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(c21223277.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler()) local g=Duel.GetMatchingGroup(c21223277.filter,tp,LOCATION_GRAVE,0,nil,e,tp,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=g:Select(tp,1,1,nil) local g1=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode()) g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(21223277,2)) then if ft>1 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(21223277,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=g:Select(tp,1,1,nil) local g2=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode()) g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
g1:Merge(g2) g1:Merge(g2)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(21223277,2)) then if ft>2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(21223277,2)) then
g2=g:Select(tp,1,1,nil) g2=g:Select(tp,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
end end
...@@ -69,3 +68,28 @@ function c21223277.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,3 +68,28 @@ function c21223277.operation(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.EquipComplete() Duel.EquipComplete()
end end
function c21223277.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c21223277.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x207a)
end
function c21223277.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c21223277.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c21223277.cfilter,tp,LOCATION_SZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c21223277.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c21223277.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c21223277.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c21223277.cfilter,tp,LOCATION_SZONE,0,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c21223277.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
...@@ -29,11 +29,12 @@ function c21296383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,11 +29,12 @@ function c21296383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingMatchingCard(c21296383.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),lv) end and Duel.IsExistingMatchingCard(c21296383.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c21296383.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),lv) local g=Duel.SelectMatchingCard(tp,c21296383.cfilter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),lv)
local slv=elv+g:GetFirst():GetLevel()
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e:SetLabel(elv+g:GetFirst():GetLevel()) e:SetLabel(slv)
local g=sg:FilterSelect(tp,Card.IsLevelBelow,1,1,nil,elv+g:GetFirst():GetLevel()) local g=sg:FilterSelect(tp,Card.IsLevelBelow,1,1,nil,slv)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
......
...@@ -34,6 +34,7 @@ function c23171610.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,6 +34,7 @@ function c23171610.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
......
...@@ -53,7 +53,7 @@ function c29401950.target2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,7 +53,7 @@ function c29401950.target2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c29401950.filter3(c,e,tp) function c29401950.filter3(c,e,tp)
return c:IsFaceup() and c:GetAttack()>=1500 and c:GetSummonPlayer()~=tp return c:IsFaceup() and c:GetAttack()>=1500 and c:GetSummonPlayer()~=tp
and c:IsRelateToEffect(e) and c:IsDestructable() and c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) and c:IsDestructable()
end end
function c29401950.activate2(e,tp,eg,ep,ev,re,r,rp) function c29401950.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c29401950.filter3,nil,e,tp) local g=eg:Filter(c29401950.filter3,nil,e,tp)
......
...@@ -32,7 +32,7 @@ function c31563350.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c31563350.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c31563350.filter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c31563350.filter,tp,LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if not Duel.Equip(tp,tc,c,true) then return end if not Duel.Equip(tp,tc,c,true) then return end
......
...@@ -20,7 +20,7 @@ function c34109611.filter(c) ...@@ -20,7 +20,7 @@ function c34109611.filter(c)
return c:IsFaceup() and c:IsSetCard(0x10) return c:IsFaceup() and c:IsSetCard(0x10)
end end
function c34109611.operation(e,tp,eg,ep,ev,re,r,rp) function c34109611.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c34109611.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c34109611.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -25,7 +25,7 @@ function c40937767.ccon(e) ...@@ -25,7 +25,7 @@ function c40937767.ccon(e)
return Duel.IsExistingMatchingCard(Card.IsPosition,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,POS_FACEDOWN_DEFENCE) return Duel.IsExistingMatchingCard(Card.IsPosition,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,POS_FACEDOWN_DEFENCE)
end end
function c40937767.damcon(e,tp,eg,ep,ev,re,r,rp) function c40937767.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:GetFirst()~=e:GetHandler() and eg:GetFirst():IsRace(RACE_ROCK) return ep==tp and eg:GetFirst()~=e:GetHandler()
end end
function c40937767.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c40937767.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--ヴィクトリー·ドラゴン --ヴィクトリー·ドラゴン
function c44910027.initial_effect(c) function c44910027.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--summon with 3 tribute --summon with 3 tribute
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
...@@ -15,8 +15,9 @@ function c57115864.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,8 +15,9 @@ function c57115864.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c57115864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57115864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg and Duel.IsExistingMatchingCard(c57115864.filter,tp,LOCATION_MZONE,0,1,nil) end if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e) end if chk==0 then return tg:IsOnField() and tg:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c57115864.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
end end
function c57115864.filter(c) function c57115864.filter(c)
......
...@@ -23,6 +23,7 @@ function c58712976.initial_effect(c) ...@@ -23,6 +23,7 @@ function c58712976.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(58712976,1)) e3:SetDescription(aux.Stringid(58712976,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c58712976.rmcon) e3:SetCondition(c58712976.rmcon)
e3:SetTarget(c58712976.rmtg) e3:SetTarget(c58712976.rmtg)
......
...@@ -22,8 +22,8 @@ end ...@@ -22,8 +22,8 @@ end
function c59546528.cfilter2(c) function c59546528.cfilter2(c)
return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end end
function c59546528.filter(c) function c59546528.filter(c,e)
return c:IsFacedown() and c:IsAbleToHand() return c:IsFacedown() and c:IsAbleToHand() and (not e or c:IsRelateToEffect(e))
end end
function c59546528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c59546528.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c59546528.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c59546528.filter(chkc) end
...@@ -42,7 +42,7 @@ function c59546528.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,7 +42,7 @@ function c59546528.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=hg:Select(tp,g:GetCount(),g:GetCount(),nil) local cg=hg:Select(tp,g:GetCount(),g:GetCount(),nil)
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
local rg=g:Filter(Card.IsRelateToEffect,nil,e) local rg=g:Filter(c59546528.filter,nil,e)
if rg:GetCount()>0 then if rg:GetCount()>0 then
Duel.SendtoHand(rg,nil,REASON_EFFECT) Duel.SendtoHand(rg,nil,REASON_EFFECT)
end end
......
...@@ -4,6 +4,7 @@ function c80863132.initial_effect(c) ...@@ -4,6 +4,7 @@ function c80863132.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c80863132.condition) e1:SetCondition(c80863132.condition)
e1:SetOperation(c80863132.activate) e1:SetOperation(c80863132.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
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