Commit 232fab46 authored by VanillaSalt's avatar VanillaSalt

fix

parent 3becf8a2
...@@ -1287,6 +1287,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1287,6 +1287,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
auto pr = effects.trigger_f_effect.equal_range(phase_event); auto pr = effects.trigger_f_effect.equal_range(phase_event);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_activateable(check_player, nil_event)) if(!peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -1298,6 +1300,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1298,6 +1300,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.trigger_o_effect.equal_range(phase_event); pr = effects.trigger_o_effect.equal_range(phase_event);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_activateable(check_player, nil_event)) if(!peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -1328,6 +1332,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1328,6 +1332,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN); pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event)) if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -1417,6 +1423,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1417,6 +1423,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
auto pr = effects.trigger_f_effect.equal_range(phase_event); auto pr = effects.trigger_f_effect.equal_range(phase_event);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_activateable(check_player, nil_event)) if(!peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -1428,6 +1436,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1428,6 +1436,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.trigger_o_effect.equal_range(phase_event); pr = effects.trigger_o_effect.equal_range(phase_event);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_activateable(check_player, nil_event)) if(!peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -1446,6 +1456,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1446,6 +1456,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN); pr = effects.activate_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event)) if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -1458,6 +1470,8 @@ int32 field::process_phase_event(int16 step, int32 phase) { ...@@ -1458,6 +1470,8 @@ int32 field::process_phase_event(int16 step, int32 phase) {
pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN); pr = effects.quick_o_effect.equal_range(EVENT_FREE_CHAIN);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event)) if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue; continue;
peffect->id = infos.field_id++; peffect->id = infos.field_id++;
...@@ -2128,10 +2142,10 @@ int32 field::process_instant_event() { ...@@ -2128,10 +2142,10 @@ int32 field::process_instant_event() {
pr = effects.quick_f_effect.equal_range(elit->event_code); pr = effects.quick_f_effect.equal_range(elit->event_code);
for(; pr.first != pr.second; ++pr.first) { for(; pr.first != pr.second; ++pr.first) {
peffect = pr.first->second; peffect = pr.first->second;
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
if(peffect->is_activateable(peffect->handler->current.controler, *elit)) { if(peffect->is_activateable(peffect->handler->current.controler, *elit)) {
peffect->handler->create_relation(peffect); peffect->handler->create_relation(peffect);
peffect->s_range = peffect->handler->current.location;
peffect->o_range = peffect->handler->current.sequence;
newchain.flag = 0; newchain.flag = 0;
newchain.chain_id = infos.field_id++; newchain.chain_id = infos.field_id++;
newchain.evt = *elit; newchain.evt = *elit;
......
...@@ -49,5 +49,5 @@ end ...@@ -49,5 +49,5 @@ end
function c15894048.facon(e) function c15894048.facon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and (c15894048[tp]~=2 or e:GetHandler():GetFlagEffect(15894048)~=0) and c15894048[tp]==e:GetHandler():GetFlagEffect(15894048)
end end
...@@ -21,10 +21,10 @@ function c1781310.dfilter2(c) ...@@ -21,10 +21,10 @@ function c1781310.dfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c1781310.condition(e,tp,eg,ep,ev,re,r,rp) function c1781310.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WIND) return Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WIND)
and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_FIRE) and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_EARTH) and Duel.IsExistingMatchingCard(c1781310.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH)
end end
function c1781310.target(e,tp,eg,ep,ev,re,r,rp,chk) function c1781310.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1781310.dfilter1,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c1781310.dfilter1,tp,0,LOCATION_MZONE,1,nil)
......
...@@ -55,7 +55,7 @@ function c20000008.setcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,7 +55,7 @@ function c20000008.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c20000008.filter(c) function c20000008.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable(true) return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true)
end end
function c20000008.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c20000008.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
......
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function c20000009.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c20000009.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c20000009.desop(e,tp,eg,ep,ev,re,r,rp) function c20000009.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -14,6 +14,7 @@ function c21620076.initial_effect(c) ...@@ -14,6 +14,7 @@ function c21620076.initial_effect(c)
e2:SetCategory(CATEGORY_LVCHANGE) e2:SetCategory(CATEGORY_LVCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c21620076.lvtg) e2:SetTarget(c21620076.lvtg)
e2:SetOperation(c21620076.lvop) e2:SetOperation(c21620076.lvop)
......
...@@ -20,11 +20,11 @@ function c24019261.filter(c,e,tp,tid) ...@@ -20,11 +20,11 @@ function c24019261.filter(c,e,tp,tid)
end end
function c24019261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24019261.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount() local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c24019261.filter(chkc,e,tp,tid) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c24019261.filter(chkc,e,tp,tid) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c24019261.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,tid) end and Duel.IsExistingTarget(c24019261.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c24019261.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,tid) local g=Duel.SelectTarget(tp,c24019261.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,tid)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c24019261.activate(e,tp,eg,ep,ev,re,r,rp) function c24019261.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -11,7 +11,7 @@ function c2926176.initial_effect(c) ...@@ -11,7 +11,7 @@ function c2926176.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c2926176.cfilter(c) function c2926176.cfilter(c)
return c:IsOnField() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c2926176.condition(e,tp,eg,ep,ev,re,r,rp) function c2926176.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainNegatable(ev) then return false end if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not Duel.IsChainNegatable(ev) then return false end
......
...@@ -25,7 +25,7 @@ function c34016756.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c34016756.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end if tc==hc then tc=g:GetNext() end
if hc:IsFaceup() and hc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if hc:IsFaceup() and hc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=hc:GetBaseAttack() local atk=hc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
...@@ -12,7 +12,7 @@ function c55256016.initial_effect(c) ...@@ -12,7 +12,7 @@ function c55256016.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c55256016.cfilter(c) function c55256016.cfilter(c)
return c:IsOnField() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) return c:IsOnField() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c55256016.condition(e,tp,eg,ep,ev,re,r,rp) function c55256016.condition(e,tp,eg,ep,ev,re,r,rp)
if tp==ep or not Duel.IsChainNegatable(ev) then return false end if tp==ep or not Duel.IsChainNegatable(ev) then return false end
......
...@@ -17,7 +17,7 @@ function c56981417.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c56981417.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c56981417.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c56981417.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c56981417.cffilter(c) function c56981417.cffilter(c)
return c:IsSetCard(0x106e) and c:IsType(TYPE_SPELL) and not c:IsPublic() return c:IsSetCard(0x106e) and not c:IsPublic()
end end
function c56981417.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c56981417.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,56981417)==0 if chk==0 then return Duel.GetFlagEffect(tp,56981417)==0
......
...@@ -47,6 +47,7 @@ function c6713443.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +47,7 @@ function c6713443.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local setg=sg:Select(tp,1,ft2,nil) local setg=sg:Select(tp,1,ft2,nil)
Duel.SSet(tp,setg) Duel.SSet(tp,setg)
Duel.ConfirmCards(1-tp,setg)
end end
end end
end end
...@@ -44,7 +44,7 @@ function c82556058.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c82556058.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000) e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82556058,2)) e2:SetDescription(aux.Stringid(82556058,2))
......
...@@ -42,5 +42,5 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,5 +42,5 @@ function c967928.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c967928.aclimit(e,re,tp) function c967928.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
...@@ -123,7 +123,7 @@ function Auxiliary.AddSynchroProcedure(c,f1,f2,ct) ...@@ -123,7 +123,7 @@ function Auxiliary.AddSynchroProcedure(c,f1,f2,ct)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Auxiliary.SynCondition(f1,f2,ct,99)) e1:SetCondition(Auxiliary.SynCondition(f1,f2,ct,99))
e1:SetOperation(Auxiliary.SynOperation(f1,f2,ct,99)) e1:SetOperation(Auxiliary.SynOperation(f1,f2,ct,99))
...@@ -160,7 +160,7 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2) ...@@ -160,7 +160,7 @@ function Auxiliary.AddSynchroProcedure2(c,f1,f2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Auxiliary.SynCondition(f1,f2,1,1)) e1:SetCondition(Auxiliary.SynCondition(f1,f2,1,1))
e1:SetOperation(Auxiliary.SynOperation(f1,f2,1,1)) e1:SetOperation(Auxiliary.SynOperation(f1,f2,1,1))
......
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