Commit 575dc568 authored by mercury233's avatar mercury233

fix

parent d8da34de
......@@ -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)
end
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
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
......
......@@ -5,8 +5,9 @@ function c101004004.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
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:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101004004)
e1:SetCondition(c101004004.tkcon)
e1:SetTarget(c101004004.tktg)
......
......@@ -20,6 +20,7 @@ function c101004005.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,0x1e0)
e2:SetCountLimit(1,101004005)
e2:SetTarget(c101004005.rmtg)
e2:SetOperation(c101004005.rmop)
......@@ -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)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101004005.rmfilter(c)
function c101004005.rmfilter(c,atk)
return c:IsFaceup() and c:GetAttack()>atk and c:IsAbleToRemove()
end
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
if chk==0 then return Duel.IsExistingTarget(c101004005.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
local atk=e:GetHandler():GetAttack()
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)
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)
end
function c101004005.rmop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2,19 +2,12 @@
--Altergeist Multifaker
function c101004014.initial_effect(c)
--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)
e2:SetDescription(aux.Stringid(101004014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCountLimit(1,101004014)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c101004014.spcon1)
......@@ -27,6 +20,7 @@ function c101004014.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,101004014+100)
e3:SetCost(c101004014.spcost)
e3:SetTarget(c101004014.sptg2)
......@@ -38,7 +32,7 @@ function c101004014.counterfilter(c)
return c:IsSetCard(0x103)
end
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
function c101004014.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
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)
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,1-tp) then return end
local token=Duel.CreateToken(tp,101004118)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
local token1=Duel.CreateToken(tp,101004118)
local token2=Duel.CreateToken(tp,101004118)
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()
end
......@@ -30,7 +30,7 @@ function c101004024.costfilter(c)
return c:IsSetCard(0x400d) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
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
fg:AddCard(pe:GetHandler())
end
......
......@@ -18,7 +18,7 @@ function c101004034.initial_effect(c)
e2:SetDescription(aux.Stringid(101004034,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(101004034)
e2:SetCode(EVENT_CUSTOM+101004034)
e2:SetTarget(c101004034.destg)
e2:SetOperation(c101004034.desop)
c:RegisterEffect(e2)
......@@ -36,7 +36,6 @@ function c101004034.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c101004034.dattg)
e3:SetOperation(c101004034.datop)
c:RegisterEffect(e3)
end
......@@ -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
cg:KeepAlive()
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
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)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
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)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......
......@@ -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 Duel.SelectYesNo(tp,aux.Stringid(101004047,1)) then
Duel.BreakEffect()
if tc:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -46,7 +46,7 @@ function c101004051.desfilter(c)
end
function c101004051.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
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