Commit 34e283ae authored by VanillaSalt's avatar VanillaSalt

fix

parent 793a6bbc
...@@ -2461,7 +2461,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl ...@@ -2461,7 +2461,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
if(summontype && (*cit)->material_cards.size()) { if(summontype && (*cit)->material_cards.size()) {
int32 matreason = (summontype == SUMMON_TYPE_FUSION) ? REASON_FUSION : (summontype == SUMMON_TYPE_RITUAL) ? REASON_RITUAL : (summontype == SUMMON_TYPE_XYZ) ? REASON_XYZ : 0; int32 matreason = (summontype == SUMMON_TYPE_FUSION) ? REASON_FUSION : (summontype == SUMMON_TYPE_RITUAL) ? REASON_RITUAL : (summontype == SUMMON_TYPE_XYZ) ? REASON_XYZ : 0;
for(auto mit = (*cit)->material_cards.begin(); mit != (*cit)->material_cards.end(); ++mit) for(auto mit = (*cit)->material_cards.begin(); mit != (*cit)->material_cards.end(); ++mit)
raise_single_event(*mit, 0, EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0); raise_single_event(*mit, &targets->container, EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0);
raise_event(&((*cit)->material_cards), EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0); raise_event(&((*cit)->material_cards), EVENT_BE_MATERIAL, core.reason_effect, matreason, core.reason_player, (*cit)->summon_player, 0);
} }
} }
......
...@@ -18,19 +18,22 @@ function c30492798.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,19 +18,22 @@ function c30492798.condition(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL return r==REASON_RITUAL
end end
function c30492798.operation(e,tp,eg,ep,ev,re,r,rp) function c30492798.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=eg:GetFirst()
if rc:GetFlagEffect(30492798)==0 then while rc do
--immune if rc:GetFlagEffect(30492798)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) --immune
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(30492798,0)) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(30492798,0))
e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c30492798.efilter) e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1,true) e1:SetValue(c30492798.efilter)
rc:RegisterFlagEffect(30492798,RESET_EVENT+0x1fe0000,0,1) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(30492798,RESET_EVENT+0x1fe0000,0,1)
end
rc=eg:GetNext()
end end
end end
function c30492798.efilter(e,te) function c30492798.efilter(e,te)
......
...@@ -18,18 +18,21 @@ function c33145233.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,18 +18,21 @@ function c33145233.condition(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL return r==REASON_RITUAL
end end
function c33145233.operation(e,tp,eg,ep,ev,re,r,rp) function c33145233.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=eg:GetFirst()
if rc:GetFlagEffect(33145233)==0 then while rc do
--untargetable if rc:GetFlagEffect(33145233)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) --untargetable
e1:SetDescription(aux.Stringid(33145233,0)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetDescription(aux.Stringid(33145233,0))
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(aux.tgoval)
rc:RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterFlagEffect(33145233,RESET_EVENT+0x1fe0000,0,1) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(33145233,RESET_EVENT+0x1fe0000,0,1)
end
rc=eg:GetNext()
end end
end end
...@@ -18,18 +18,21 @@ function c34358408.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,18 +18,21 @@ function c34358408.condition(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL return r==REASON_RITUAL
end end
function c34358408.operation(e,tp,eg,ep,ev,re,r,rp) function c34358408.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=eg:GetFirst()
if rc:GetFlagEffect(34358408)==0 then while rc do
--draw if rc:GetFlagEffect(34358408)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) --draw
e1:SetDescription(aux.Stringid(34358408,0)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(34358408,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetOperation(c34358408.drawop) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetOperation(c34358408.drawop)
rc:RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterFlagEffect(34358408,RESET_EVENT+0x1fe0000,0,1) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(34358408,RESET_EVENT+0x1fe0000,0,1)
end
rc=eg:GetNext()
end end
end end
function c34358408.drawop(e,tp,eg,ep,ev,re,r,rp) function c34358408.drawop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,18 +18,21 @@ function c4141820.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,18 +18,21 @@ function c4141820.condition(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL return r==REASON_RITUAL
end end
function c4141820.operation(e,tp,eg,ep,ev,re,r,rp) function c4141820.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=eg:GetFirst()
if rc:GetFlagEffect(4141820)==0 then while rc do
--draw if rc:GetFlagEffect(4141820)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) --draw
e1:SetDescription(aux.Stringid(4141820,0)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(4141820,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetOperation(c4141820.hdop) e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetOperation(c4141820.hdop)
rc:RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterFlagEffect(4141820,RESET_EVENT+0x1fe0000,0,1) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(4141820,RESET_EVENT+0x1fe0000,0,1)
end
rc=eg:GetNext()
end end
end end
function c4141820.hdop(e,tp,eg,ep,ev,re,r,rp) function c4141820.hdop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,27 +18,30 @@ function c77153811.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,27 +18,30 @@ function c77153811.condition(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL return r==REASON_RITUAL
end end
function c77153811.operation(e,tp,eg,ep,ev,re,r,rp) function c77153811.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=eg:GetFirst()
if rc:GetFlagEffect(77153811)==0 then while rc do
--cannot special summon if rc:GetFlagEffect(77153811)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) --cannot special summon
e1:SetDescription(aux.Stringid(77153811,0)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetDescription(aux.Stringid(77153811,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c77153811.distg) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_DISABLE) e1:SetTarget(c77153811.distg)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetCode(EFFECT_DISABLE)
rc:RegisterEffect(e1,true) e1:SetReset(RESET_EVENT+0x1fe0000)
local e2=Effect.CreateEffect(e:GetHandler()) rc:RegisterEffect(e1,true)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetOperation(c77153811.disop) e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetOperation(c77153811.disop)
rc:RegisterEffect(e2,true) e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterFlagEffect(77153811,RESET_EVENT+0x1fe0000,0,1) rc:RegisterEffect(e2,true)
rc:RegisterFlagEffect(77153811,RESET_EVENT+0x1fe0000,0,1)
end
rc=eg:GetNext()
end end
end end
function c77153811.distg(e,c) function c77153811.distg(e,c)
......
...@@ -18,18 +18,21 @@ function c8903700.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,18 +18,21 @@ function c8903700.condition(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL return r==REASON_RITUAL
end end
function c8903700.operation(e,tp,eg,ep,ev,re,r,rp) function c8903700.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard() local rc=eg:GetFirst()
if rc:GetFlagEffect(8903700)==0 then while rc do
--cannot special summon if rc:GetFlagEffect(8903700)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) --cannot special summon
e1:SetDescription(aux.Stringid(8903700,0)) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET) e1:SetDescription(aux.Stringid(8903700,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetAbsoluteRange(rp,0,1) e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1,true) e1:SetAbsoluteRange(rp,0,1)
rc:RegisterFlagEffect(8903700,RESET_EVENT+0x1fe0000,0,1) rc:RegisterEffect(e1,true)
rc:RegisterFlagEffect(8903700,RESET_EVENT+0x1fe0000,0,1)
end
rc=eg:GetNext()
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