Commit 7a2bb808 authored by VanillaSalt's avatar VanillaSalt

fix

parent 0b95e4cb
...@@ -407,7 +407,7 @@ int32 effect::is_immuned(effect_set_v* effects) { ...@@ -407,7 +407,7 @@ int32 effect::is_immuned(effect_set_v* effects) {
for (int i = 0; i < effects->count; ++i) { for (int i = 0; i < effects->count; ++i) {
peffect = effects->at(i); peffect = effects->at(i);
if(type & 0x7f0) { if(type & 0x7f0) {
if(peffect->handler == owner) if(peffect->owner == handler)
return FALSE; return FALSE;
} else { } else {
if(peffect->owner == owner) if(peffect->owner == owner)
......
...@@ -33,6 +33,7 @@ function c18175965.initial_effect(c) ...@@ -33,6 +33,7 @@ function c18175965.initial_effect(c)
e5:SetDescription(aux.Stringid(18175965,1)) e5:SetDescription(aux.Stringid(18175965,1))
e5:SetCategory(CATEGORY_EQUIP) e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetTarget(c18175965.eqtg) e5:SetTarget(c18175965.eqtg)
e5:SetOperation(c18175965.eqop) e5:SetOperation(c18175965.eqop)
......
...@@ -7,6 +7,7 @@ function c1833916.initial_effect(c) ...@@ -7,6 +7,7 @@ function c1833916.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c1833916.spcon)
e1:SetCost(c1833916.spcost) e1:SetCost(c1833916.spcost)
e1:SetTarget(c1833916.sptg) e1:SetTarget(c1833916.sptg)
e1:SetOperation(c1833916.spop) e1:SetOperation(c1833916.spop)
...@@ -20,11 +21,14 @@ function c1833916.initial_effect(c) ...@@ -20,11 +21,14 @@ function c1833916.initial_effect(c)
e2:SetCode(EVENT_DAMAGE) e2:SetCode(EVENT_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,1833916) e2:SetCountLimit(1,1833916)
e2:SetCondition(c1833916.spcon) e2:SetCondition(c1833916.spcon2)
e2:SetTarget(c1833916.sptg2) e2:SetTarget(c1833916.sptg2)
e2:SetOperation(c1833916.spop2) e2:SetOperation(c1833916.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1833916.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttackPos()
end
function c1833916.cfilter(c) function c1833916.cfilter(c)
return c:IsSetCard(0x6f) and c:IsDiscardable() return c:IsSetCard(0x6f) and c:IsDiscardable()
end end
...@@ -63,7 +67,7 @@ end ...@@ -63,7 +67,7 @@ end
function c1833916.splimit(e,c) function c1833916.splimit(e,c)
return not c:IsSetCard(0x6f) return not c:IsSetCard(0x6f)
end end
function c1833916.spcon(e,tp,eg,ep,ev,re,r,rp) function c1833916.spcon2(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
end end
function c1833916.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c1833916.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -55,7 +55,7 @@ function c22200403.initial_effect(c) ...@@ -55,7 +55,7 @@ function c22200403.initial_effect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_BATTLE_DESTROYING) e7:SetCode(EVENT_BATTLE_DESTROYING)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetCondition(c22200403.atcon) e7:SetCondition(c22200403.effcon)
e7:SetTarget(c22200403.drtg) e7:SetTarget(c22200403.drtg)
e7:SetOperation(c22200403.drop) e7:SetOperation(c22200403.drop)
e7:SetLabel(4) e7:SetLabel(4)
......
...@@ -22,6 +22,7 @@ function c29143726.initial_effect(c) ...@@ -22,6 +22,7 @@ function c29143726.initial_effect(c)
end end
function c29143726.spcon1(e,tp,eg,ep,ev,re,r,rp) function c29143726.spcon1(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():GetPreviousControler()==tp return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and e:GetHandler():GetPreviousControler()==tp
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c29143726.spcon2(e,tp,eg,ep,ev,re,r,rp) function c29143726.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
......
...@@ -24,13 +24,13 @@ function c32298781.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,13 +24,13 @@ function c32298781.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetBaseAttack()+2000) e1:SetValue(tc:GetBaseAttack()+2000)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENCE) e2:SetCode(EFFECT_SET_BASE_DEFENCE)
e2:SetValue(tc:GetBaseDefence()+2000) e2:SetValue(tc:GetBaseDefence()+2000)
e2:SetReset(RESET_EVENT+0x1ff0000) e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
tc=g:GetNext() tc=g:GetNext()
end end
......
...@@ -13,8 +13,8 @@ end ...@@ -13,8 +13,8 @@ end
function c43225434.condition(e,tp,eg,ep,ev,re,r,rp) function c43225434.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return at and (a:IsControler(tp) and a:IsType(TYPE_FUSION)) return at and ((a:IsControler(tp) and a:IsType(TYPE_FUSION))
or (at:IsControler(tp) and at:IsFaceup() and a:IsType(TYPE_FUSION)) or (at:IsControler(tp) and at:IsFaceup() and a:IsType(TYPE_FUSION)))
end end
function c43225434.activate(e,tp,eg,ep,ev,re,r,rp) function c43225434.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -45,7 +45,7 @@ function c69757518.atcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function c69757518.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c69757518.atop(e,tp,eg,ep,ev,re,r,rp) function c69757518.atop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToBattle() then if e:GetHandler():IsRelateToBattle() and e:GetHandler():IsChainAttackable(2,true) then
Duel.ChainAttack() Duel.ChainAttack()
end end
end end
......
...@@ -55,7 +55,7 @@ function c74875003.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c74875003.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c74875003.sumval(c) function c74875003.sumval(e,c)
return not c:IsCode(10000000) and not c:IsCode(10000010) and not c:IsCode(10000020) return not c:IsCode(10000000) and not c:IsCode(10000010) and not c:IsCode(10000020)
end end
function c74875003.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c74875003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
......
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function c89719143.condition(e,tp,eg,ep,ev,re,r,rp) function c89719143.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return a:IsFaceup() and a:IsType(TYPE_FUSION) and at and at:IsFaceup() and at:IsType(TYPE_FUSION) return a and at and a:IsFaceup() and a:IsType(TYPE_FUSION) and at:IsFaceup() and at:IsType(TYPE_FUSION)
end end
function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
......
...@@ -24,11 +24,11 @@ function c91110378.initial_effect(c) ...@@ -24,11 +24,11 @@ function c91110378.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c91110378.cfilter(c) function c91110378.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x86) return c:IsFaceup() and c:IsSetCard(0x86) and c:GetSummonPlayer()==tp
end end
function c91110378.spcon(e,tp,eg,ep,ev,re,r,rp) function c91110378.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c91110378.cfilter,1,nil) and rp==tp return eg:IsExists(c91110378.cfilter,1,nil,tp)
end end
function c91110378.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c91110378.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
......
--RUM-千死蛮巧 --RUM-千死蛮巧
function c96142517.initial_effect(c) function c96142517.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -26,46 +26,49 @@ function c96142517.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -26,46 +26,49 @@ function c96142517.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetHandler()~=se:GetHandler() return e:GetHandler()~=se:GetHandler()
end end
function c96142517.filter1(c,e,tp) function c96142517.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) local rk=c:GetRank()
and Duel.IsExistingMatchingCard(c96142517.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1) return c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c96142517.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp,rk)
and Duel.IsExistingMatchingCard(c96142517.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,rk+1)
end end
function c96142517.filter2(c,e,tp,rank) function c96142517.filter2(c,e,tp,rk)
return c:GetRank()==rank and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073)) return c:IsType(TYPE_XYZ) and c:GetRank()==rk and c:IsCanBeEffectTarget(e)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c96142517.filter3(c,e,tp,rank) function c96142517.spfilter(c,e,tp,rk)
return c:GetRank()==rank and c:IsType(TYPE_XYZ) return c:GetRank()==rk and (c:IsSetCard(0x1048) or c:IsSetCard(0x1073))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96142517.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c96142517.filter1(chkc,e,tp) end if chkc then return false 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(c96142517.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)end and Duel.IsExistingTarget(c96142517.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c96142517.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local rk=g1:GetFirst():GetRank()
e:SetLabel(rk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=Duel.SelectTarget(tp,c96142517.filter1,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp) local g2=Duel.SelectTarget(tp,c96142517.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,rk)
e:SetLabel(tg:GetFirst():GetRank()) g1:Merge(g2)
local g=Duel.GetMatchingGroup(c96142517.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,tg:GetFirst(),e,tp,tg:GetFirst():GetRank()) local g=Duel.GetMatchingGroup(c96142517.filter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp,rk)
g:Sub(g1)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96142517,1)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(96142517,1)) then
g=g:Select(tp,1,99,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tg:Merge(g) local sg=g:Select(tp,1,99,nil)
local tc=g:GetFirst() Duel.SetTargetCard(sg)
while tc do g1:Merge(sg)
Duel.SetTargetCard(tc)
tc=g:GetNext()
end
end end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg,2,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c96142517.activate(e,tp,eg,ep,ev,re,r,rp) function c96142517.activate(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 rank=e:GetLabel() local rk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c96142517.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rank+1) local g=Duel.SelectMatchingCard(tp,c96142517.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rk+1)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.Overlay(sc,g) Duel.Overlay(sc,mg)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure() sc:CompleteProcedure()
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