Commit cbc1b6a9 authored by VanillaSalt's avatar VanillaSalt

fix

parent 16a98132
......@@ -561,7 +561,7 @@ int32 interpreter::register_card(card *pcard) {
lua_setmetatable(current_state, -2);
lua_pop(current_state, 1);
//Initial
if(pcard->data.code && !(pcard->data.type & TYPE_NORMAL)) {
if(pcard->data.code && (pcard->data.type != TYPE_NORMAL + TYPE_MONSTER)) {
pcard->set_status(STATUS_INITIALIZING, TRUE);
add_param(pcard, PARAM_TYPE_CARD);
call_card_function(pcard, (char*) "initial_effect", 1, 0);
......
......@@ -2173,7 +2173,7 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
if(!pcard->is_status(STATUS_SUMMONING)) {
pgroup->container.erase(pcard);
if(pcard->current.location == LOCATION_MZONE)
cset.insert(*cit);
cset.insert(pcard);
}
}
if(cset.size() == 0)
......
......@@ -10,7 +10,7 @@ function c49217579.initial_effect(c)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
......@@ -41,5 +41,7 @@ function c49217579.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function c49217579.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
if e:GetHandler():IsRelateToEffect(e) then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
end
......@@ -5,12 +5,9 @@ function c68836428.initial_effect(c)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68836428,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLED)
e1:SetTarget(c68836428.rmtg)
e1:SetOperation(c68836428.rmop)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
......@@ -27,17 +24,6 @@ function c68836428.initial_effect(c)
e2:SetOperation(c68836428.operation)
c:RegisterEffect(e2)
end
function c68836428.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc and bc:IsRelateToBattle() and bc:IsStatus(STATUS_BATTLE_DESTROYED) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0)
end
function c68836428.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
function c68836428.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
......
......@@ -899,7 +899,7 @@ function Auxiliary.AddPendulumProcedure(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(Auxiliary.PendCondition())
e1:SetOperation(Auxiliary.PendOperation())
......@@ -939,7 +939,6 @@ function Auxiliary.PendOperation()
local rscale=rpz:GetRightScale()
if lscale>rscale then lscale,rscale=rscale,lscale end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return false end
if og then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=og:FilterSelect(tp,Auxiliary.PConditionFilter,1,ft,nil,e,tp,lscale,rscale)
......
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