Commit 313897fd authored by VanillaSalt's avatar VanillaSalt

fix

parent 2cb873b4
......@@ -2505,7 +2505,8 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
if (pcard->is_destructable() && pcard->is_affect_by_effect(pcard->current.reason_effect)) {
effect* indestructable_effect = pcard->check_indestructable_by_effect(pcard->current.reason_effect, reason_player);
if (indestructable_effect) {
indestructable_effect_set.insert(indestructable_effect);
if(reason_player != 5)
indestructable_effect_set.insert(indestructable_effect);
is_destructable = false;
}
} else
......@@ -2527,7 +2528,8 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
pduel->lua->add_param(pcard->current.reason_player, PARAM_TYPE_INT);
if(eset[i]->check_value_condition(3)) {
eset[i]->dec_count();
indestructable_effect_set.insert(eset[i]);
if(reason_player != 5)
indestructable_effect_set.insert(eset[i]);
is_destructable = false;
break;
}
......
......@@ -13,9 +13,12 @@ end
function c17021204.spfilter(c)
return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsAbleToGraveAsCost()
end
function c17021204.cfilter(c)
return c:GetRace()~=RACE_INSECT
end
function c17021204.check(tp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()~=0 and not g:IsExists(Card.IsRace,1,nil,0xfffffff-RACE_INSECT)
return g:GetCount()~=0 and not g:IsExists(c17021204.cfilter,1,nil)
end
function c17021204.spcon(e,c)
if c==nil then return true end
......
......@@ -12,9 +12,12 @@ function c36318200.initial_effect(c)
e1:SetOperation(c36318200.spop)
c:RegisterEffect(e1)
end
function c36318200.cfilter(c)
return c:GetRace()~=RACE_BEAST
end
function c36318200.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()>0 and not g:IsExists(Card.IsRace,1,nil,0xfffffff-RACE_BEAST)
return g:GetCount()>0 and not g:IsExists(c36318200.cfilter,1,nil)
end
function c36318200.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......
......@@ -21,12 +21,15 @@ function c45458027.initial_effect(c)
e2:SetOperation(c45458027.operation)
c:RegisterEffect(e2)
end
function c45458027.cfilter(c)
return c:GetRace()~=RACE_MACHINE
end
function c45458027.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()>0 and not g:IsExists(Card.IsRace,1,nil,0xffffff-RACE_MACHINE)
return g:GetCount()>0 and not g:IsExists(c45458027.cfilter,1,nil)
end
function c45458027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsLocation(LOCATION_MZONE) end
......
......@@ -11,8 +11,11 @@ function c64973456.initial_effect(c)
e1:SetOperation(c64973456.activate)
c:RegisterEffect(e1)
end
function c64973456.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:GetRace()~=RACE_REPTILE
end
function c64973456.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,1,nil,0xf7ffff)
return not Duel.IsExistingMatchingCard(c64973456.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c64973456.filter(c,e,tp)
return not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -13,9 +13,12 @@ function c72580321.initial_effect(c)
e1:SetOperation(c72580321.spop)
c:RegisterEffect(e1)
end
function c72580321.cfilter(c)
return c:GetAttribute()~=ATTRIBUTE_EARTH
end
function c72580321.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
return g:GetCount()>0 and not g:IsExists(Card.IsAttribute,1,nil,0xffff-ATTRIBUTE_EARTH)
return g:GetCount()>0 and not g:IsExists(c72580321.cfilter,1,nil)
end
function c72580321.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......
......@@ -8,6 +8,7 @@ function c76224717.initial_effect(c)
--destroy/draw/salvage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76224717,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
......@@ -57,21 +58,16 @@ function c76224717.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=c76224717[tp]>1 and Duel.IsPlayerCanDraw(tp,1)
local b3=c76224717[tp]>2 and Duel.IsExistingMatchingCard(c76224717.filter2,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
local cat=0
if b1 then
cat=cat+CATEGORY_DESTROY
local g=Duel.GetMatchingGroup(c76224717.filter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
if b2 then
cat=cat+CATEGORY_DRAW
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if b3 then
cat=cat+CATEGORY_TOHAND
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
e:SetCategory(cat)
end
function c76224717.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -685,14 +685,14 @@ function Auxiliary.FOperationCodeFun(code,f,cc,sub,insf)
sg1:Sub(sg2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg1:Select(tp,1,1,nil)
local g1=sg1:Select(tp,1,1,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=sg2:Select(tp,cc-1,cc-1,g1:GetFirst())
g1:Merge(g2)
Duel.SetFusionMaterial(g1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=sg1:Select(tp,1,1,nil)
local g1=sg1:Select(tp,1,1,gc)
Duel.SetFusionMaterial(g1)
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