Commit 575dc568 authored by mercury233's avatar mercury233

fix

parent d8da34de
...@@ -41,7 +41,7 @@ function c100408026.spfilter1(c,e,tp) ...@@ -41,7 +41,7 @@ function c100408026.spfilter1(c,e,tp)
and lv>0 and Duel.IsExistingMatchingCard(c100408026.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,lv) and lv>0 and Duel.IsExistingMatchingCard(c100408026.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end end
function c100408026.spfilter2(c,e,tp,lv) function c100408026.spfilter2(c,e,tp,lv)
return c:GetLevel()>lv and c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()<lv and c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100408026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100408026.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c100408026.spfilter1(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and c100408026.spfilter1(chkc,e,tp) end
......
...@@ -5,8 +5,9 @@ function c101004004.initial_effect(c) ...@@ -5,8 +5,9 @@ function c101004004.initial_effect(c)
--token --token
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101004004) e1:SetCountLimit(1,101004004)
e1:SetCondition(c101004004.tkcon) e1:SetCondition(c101004004.tkcon)
e1:SetTarget(c101004004.tktg) e1:SetTarget(c101004004.tktg)
......
...@@ -20,6 +20,7 @@ function c101004005.initial_effect(c) ...@@ -20,6 +20,7 @@ function c101004005.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,0x1e0)
e2:SetCountLimit(1,101004005) e2:SetCountLimit(1,101004005)
e2:SetTarget(c101004005.rmtg) e2:SetTarget(c101004005.rmtg)
e2:SetOperation(c101004005.rmop) e2:SetOperation(c101004005.rmop)
...@@ -39,14 +40,15 @@ function c101004005.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -39,14 +40,15 @@ function c101004005.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c101004005.sprfilter,tp,LOCATION_GRAVE,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,c101004005.sprfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101004005.rmfilter(c) function c101004005.rmfilter(c,atk)
return c:IsFaceup() and c:GetAttack()>atk and c:IsAbleToRemove() return c:IsFaceup() and c:GetAttack()>atk and c:IsAbleToRemove()
end end
function c101004005.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004005.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101004005.rmfilter(chkc) end local atk=e:GetHandler():GetAttack()
if chk==0 then return Duel.IsExistingTarget(c101004005.rmfilter,tp,0,LOCATION_MZONE,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101004005.rmfilter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(c101004005.rmfilter,tp,0,LOCATION_MZONE,1,nil,atk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c101004005.rmfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c101004005.rmfilter,tp,0,LOCATION_MZONE,1,1,nil,atk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c101004005.rmop(e,tp,eg,ep,ev,re,r,rp) function c101004005.rmop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -2,19 +2,12 @@ ...@@ -2,19 +2,12 @@
--Altergeist Multifaker --Altergeist Multifaker
function c101004014.initial_effect(c) function c101004014.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101004014,0)) e2:SetDescription(aux.Stringid(101004014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCountLimit(1,101004014) e2:SetCountLimit(1,101004014)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101004014.spcon1) e2:SetCondition(c101004014.spcon1)
...@@ -27,6 +20,7 @@ function c101004014.initial_effect(c) ...@@ -27,6 +20,7 @@ function c101004014.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101004014+100) e3:SetCountLimit(1,101004014+100)
e3:SetCost(c101004014.spcost) e3:SetCost(c101004014.spcost)
e3:SetTarget(c101004014.sptg2) e3:SetTarget(c101004014.sptg2)
...@@ -38,7 +32,7 @@ function c101004014.counterfilter(c) ...@@ -38,7 +32,7 @@ function c101004014.counterfilter(c)
return c:IsSetCard(0x103) return c:IsSetCard(0x103)
end end
function c101004014.spcon1(e,tp,eg,ep,ev,re,r,rp) function c101004014.spcon1(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_TRAP) and e:GetHandler():GetFlagEffect(1)>0 return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
end end
function c101004014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c101004014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -77,8 +77,9 @@ function c101004018.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,8 +77,9 @@ function c101004018.tkop(e,tp,eg,ep,ev,re,r,rp)
or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,101004118,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE) or not Duel.IsPlayerCanSpecialSummonMonster(tp,101004118,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,101004118,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,101004118,0xfe,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_DARK,POS_FACEUP_DEFENSE,1-tp) then return end
local token=Duel.CreateToken(tp,101004118) local token1=Duel.CreateToken(tp,101004118)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) local token2=Duel.CreateToken(tp,101004118)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonStep(token2,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -30,7 +30,7 @@ function c101004024.costfilter(c) ...@@ -30,7 +30,7 @@ function c101004024.costfilter(c)
return c:IsSetCard(0x400d) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x400d) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end end
function c101004024.setcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101004024.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
local fc=Duel.IsPlayerAffectedByEffect(tp,101004060) local fg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,101004060)}) do for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,101004060)}) do
fg:AddCard(pe:GetHandler()) fg:AddCard(pe:GetHandler())
end end
......
...@@ -18,7 +18,7 @@ function c101004034.initial_effect(c) ...@@ -18,7 +18,7 @@ function c101004034.initial_effect(c)
e2:SetDescription(aux.Stringid(101004034,0)) e2:SetDescription(aux.Stringid(101004034,0))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(101004034) e2:SetCode(EVENT_CUSTOM+101004034)
e2:SetTarget(c101004034.destg) e2:SetTarget(c101004034.destg)
e2:SetOperation(c101004034.desop) e2:SetOperation(c101004034.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -36,7 +36,6 @@ function c101004034.initial_effect(c) ...@@ -36,7 +36,6 @@ function c101004034.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c101004034.dattg)
e3:SetOperation(c101004034.datop) e3:SetOperation(c101004034.datop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
...@@ -85,20 +84,16 @@ function c101004034.plchk(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,20 +84,16 @@ function c101004034.plchk(e,tp,eg,ep,ev,re,r,rp)
elseif cg:IsExists(c101004034.gfilter,1,nil,e:GetLabelObject()) then elseif cg:IsExists(c101004034.gfilter,1,nil,e:GetLabelObject()) then
cg:KeepAlive() cg:KeepAlive()
e:SetLabelObject(cg) e:SetLabelObject(cg)
Duel.RaiseSingleEvent(c,101004034,e,0,0,0,0) Duel.RaiseSingleEvent(c,EVENT_CUSTOM+101004034,e,0,0,0,0)
end end
end end
function c101004034.dattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,0,0)
end
function c101004034.datop(e,tp,eg,ep,ev,re,r,rp) function c101004034.datop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetBaseAttack()/2) e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -56,6 +56,9 @@ function c101004047.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +56,9 @@ function c101004047.tdop(e,tp,eg,ep,ev,re,r,rp)
and e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) and e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(101004047,1)) then and Duel.SelectYesNo(tp,aux.Stringid(101004047,1)) then
Duel.BreakEffect() Duel.BreakEffect()
if tc:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
......
...@@ -46,7 +46,7 @@ function c101004051.desfilter(c) ...@@ -46,7 +46,7 @@ function c101004051.desfilter(c)
end end
function c101004051.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101004051.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c93966624.desfilter,tp,LOCATION_ONFIELD,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c101004051.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(c101004051.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(c101004051.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c101004051.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g1=Duel.SelectTarget(tp,c101004051.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
......
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