Commit 5b0719c9 authored by VanillaSalt's avatar VanillaSalt

fix

parent eca48f93
...@@ -3649,7 +3649,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec ...@@ -3649,7 +3649,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
flips.insert(pcard); flips.insert(pcard);
} }
if(enable) { if(enable) {
if(!reason_effect || !(reason_effect->type & 0x7f0)) if(!reason_effect || !(reason_effect->type & 0x7f0) || pcard->current.location != LOCATION_MZONE)
pcard->enable_field_effect(TRUE); pcard->enable_field_effect(TRUE);
else else
core.delayed_enable_set.insert(pcard); core.delayed_enable_set.insert(pcard);
......
...@@ -573,6 +573,7 @@ int32 field::process() { ...@@ -573,6 +573,7 @@ int32 field::process() {
case PROCESSOR_ANNOUNCE_NUMBER: { case PROCESSOR_ANNOUNCE_NUMBER: {
if(announce_number(it->step, it->arg1)) { if(announce_number(it->step, it->arg1)) {
pduel->lua->add_param(core.select_options[returns.ivalue[0]], PARAM_TYPE_INT); pduel->lua->add_param(core.select_options[returns.ivalue[0]], PARAM_TYPE_INT);
pduel->lua->add_param(returns.ivalue[0], PARAM_TYPE_INT);
core.units.pop_front(); core.units.pop_front();
} else { } else {
it->step++; it->step++;
......
...@@ -42,7 +42,7 @@ end ...@@ -42,7 +42,7 @@ end
function c13647631.spop(e,tp,eg,ep,ev,re,r,rp) function c13647631.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local atk=c:GetBaseAttack() local atk=c:GetBaseAttack()
local def=c:GetBaseDefence() local def=c:GetBaseDefence()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -55,6 +55,7 @@ function c13647631.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,6 +55,7 @@ function c13647631.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_BASE_DEFENCE) e2:SetCode(EFFECT_SET_BASE_DEFENCE)
e2:SetValue(def/2) e2:SetValue(def/2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end end
end end
function c13647631.descon(e,tp,eg,ep,ev,re,r,rp) function c13647631.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -65,8 +65,7 @@ function c21105106.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,8 +65,7 @@ function c21105106.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL
end end
function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c21105106.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==1 end and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==1 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -29,12 +29,18 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,12 +29,18 @@ function c22404675.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c22404675.spop(e,tp,eg,ep,ev,re,r,rp) function c22404675.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) if c:IsRelateToEffect(e) then
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
and Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(c,REASON_EFFECT)
end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,0x4011,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT) then and Duel.IsPlayerCanSpecialSummonMonster(tp,22404676,0,0x4011,800,1000,1,RACE_THUNDER,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,22404676) local token=Duel.CreateToken(tp,22404676)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE)
end
Duel.SpecialSummonComplete()
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -24,7 +24,7 @@ function c23516703.initial_effect(c) ...@@ -24,7 +24,7 @@ function c23516703.initial_effect(c)
local et=Effect.CreateEffect(c) local et=Effect.CreateEffect(c)
et:SetType(EFFECT_TYPE_FIELD) et:SetType(EFFECT_TYPE_FIELD)
et:SetCode(EFFECT_LEFT_SPSUMMON_COUNT) et:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
et:SetRange(LOCATION_MZONE) et:SetRange(LOCATION_SZONE)
et:SetProperty(EFFECT_FLAG_PLAYER_TARGET) et:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
et:SetTargetRange(1,1) et:SetTargetRange(1,1)
et:SetValue(c23516703.countval) et:SetValue(c23516703.countval)
......
...@@ -27,6 +27,21 @@ function c24348804.initial_effect(c) ...@@ -27,6 +27,21 @@ function c24348804.initial_effect(c)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c24348804.distg) e3:SetTarget(c24348804.distg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not c24348804.global_check then
c24348804.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c24348804.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c24348804.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(24348804,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end end
function c24348804.cfilter(c) function c24348804.cfilter(c)
return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL return bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
...@@ -65,5 +80,5 @@ function c24348804.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,5 +80,5 @@ function c24348804.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c24348804.distg(e,c) function c24348804.distg(e,c)
return c:IsStatus(STATUS_SUMMON_TURN) and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL return c:GetFlagEffect(24348804)~=0
end end
...@@ -22,8 +22,9 @@ function c39454112.diceop(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,8 +22,9 @@ function c39454112.diceop(e,tp,eg,ep,ev,re,r,rp)
local ac=1 local ac=1
local ct=bit.band(ev,0xff)+bit.rshift(ev,16) local ct=bit.band(ev,0xff)+bit.rshift(ev,16)
if ct>1 then if ct>1 then
local val
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39454112,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39454112,1))
ac=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct)) val,ac=Duel.AnnounceNumber(tp,table.unpack(dc,1,ct))
end end
if dc[ac]==1 or dc[ac]==3 or dc[ac]==5 then dc[ac]=6 if dc[ac]==1 or dc[ac]==3 or dc[ac]==5 then dc[ac]=6
else dc[ac]=1 end else dc[ac]=1 end
......
...@@ -32,9 +32,28 @@ function c60621361.initial_effect(c) ...@@ -32,9 +32,28 @@ function c60621361.initial_effect(c)
e4:SetCondition(c60621361.descon) e4:SetCondition(c60621361.descon)
e4:SetOperation(c60621361.desop) e4:SetOperation(c60621361.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not c60621361.global_check then
c60621361.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c60621361.spcheckop)
Duel.RegisterEffect(ge1,0)
end
end
function c60621361.spcheckop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,60621361,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,60621361,RESET_PHASE+PHASE_END,0,1) end
end end
function c60621361.condition(e,tp,eg,ep,ev,re,r,rp) function c60621361.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetActivityCount(1-tp,ACTIVITY_SPSUMMON)~=0 return Duel.GetFlagEffect(1-tp,60621361)~=0
end end
function c60621361.filter(c,e,tp) function c60621361.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -83,11 +83,6 @@ function c71422989.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,11 +83,6 @@ function c71422989.activate(e,tp,eg,ep,ev,re,r,rp)
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
elseif Duel.IsPlayerCanSpecialSummon(tp) then
local cg1=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_MZONE,0)
Duel.ConfirmCards(1-tp,cg1)
local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
Duel.ConfirmCards(1-tp,cg2)
end end
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