Commit 8d6ea06a authored by mercury233's avatar mercury233

fix

parent ce21e3ef
......@@ -38,7 +38,7 @@ end
function c100266015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100266015.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c100266015.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c100266015.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c100266015.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -38,16 +38,17 @@ function c100268001.rfilter(c,tp)
end
function c100268001.fselect(g,tp)
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLevel,8) and aux.mzctcheckrel(g,tp)
return g:CheckWithSumGreater(Card.GetLevel,8)
and Duel.GetMZoneCount(tp,g)>0 and Duel.CheckReleaseGroupEx(tp,Auxiliary.IsInGroup,#g,nil,g)
end
function c100268001.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp,true):Filter(c100268001.rfilter,nil,tp)
local rg=Duel.GetReleaseGroup(tp,true):Filter(c100268001.rfilter,c,tp)
return rg:CheckSubGroup(c100268001.fselect,1,rg:GetCount(),tp)
end
function c100268001.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp,true):Filter(c100268001.rfilter,nil,tp)
local rg=Duel.GetReleaseGroup(tp,true):Filter(c100268001.rfilter,c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,c100268001.fselect,true,1,rg:GetCount(),tp)
if sg then
......
......@@ -20,7 +20,7 @@ function c100311001.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100311001+100)
e2:SetCountLimit(1,100311001+100)
e2:SetTarget(c100311001.distg)
e2:SetOperation(c100311001.disop)
c:RegisterEffect(e2)
......@@ -28,7 +28,8 @@ function c100311001.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCountLimit(1,100311001+200)
e3:SetCountLimit(1,100311001+200)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100311001.eqcon)
e3:SetTarget(c100311001.eqtg)
e3:SetOperation(c100311001.eqop)
......@@ -69,17 +70,20 @@ function c100311001.disop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
......@@ -88,6 +92,7 @@ function c100311001.disop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-ct*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
......@@ -95,7 +100,7 @@ function c100311001.disop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100311001.cfilter(c,tp)
return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()~=tp
return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==1-tp and c:IsType(TYPE_MONSTER)
end
function c100311001.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100311001.cfilter,1,nil,tp)
......@@ -105,27 +110,23 @@ function c100311001.filter(c,e,tp)
and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and not c:IsForbidden()
end
function c100311001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return ct>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and eg:IsExists(c100311001.filter,1,nil,e,tp) end
local g=eg:Filter(c100311001.filter,nil,e,tp)
local tc=nil
local tg=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tc=g:Select(tp,1,ct,nil)
tg=g:Select(tp,1,1,nil)
else
tc=g
tg=g
end
e:SetLabelObject(tc)
tc:ForEach(Card.CreateEffectRelation,e)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,#tc,0,0)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg,1,0,0)
end
function c100311001.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=e:GetLabelObject()
g=g:Filter(Card.IsRelateToEffect,nil,e)
if c:IsFaceup() then
for tc in aux.Next(g) do
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and tc:IsRelateToEffect(e) then
if Duel.Equip(tp,tc,c,true,true) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -136,7 +137,6 @@ function c100311001.eqop(e,tp,eg,ep,ev,re,r,rp)
end
Duel.EquipComplete()
end
end
end
function c100311001.eqlimit(e,c)
return e:GetOwner()==c
......
......@@ -8,7 +8,7 @@ function c101102005.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,c101102005)
e1:SetCountLimit(1,101102005)
e1:SetCondition(c101102005.spcon)
e1:SetTarget(c101102005.sptg)
e1:SetOperation(c101102005.spop)
......
......@@ -5,7 +5,7 @@ function c101102019.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101102019,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -46,7 +46,7 @@ function c101102019.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101102019.negfilter(c)
return c:IsFaceup() and not c:IsDisabled() and not c:IsSetCard(0xb2)
return aux.disfilter1(c) and not c:IsSetCard(0xb2)
end
function c101102019.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
......@@ -92,18 +92,18 @@ function c101102019.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
nc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
nc:RegisterEffect(e2)
if nc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
nc:RegisterEffect(e3)
end
nc=b2:GetNext()
......
......@@ -12,6 +12,7 @@ function c101102032.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,101102032)
e1:SetTarget(c101102032.target)
e1:SetOperation(c101102032.operation)
c:RegisterEffect(e1)
......
......@@ -22,6 +22,7 @@ function c101102033.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,101102033)
e2:SetCondition(c101102033.discon)
e2:SetTarget(c101102033.distg)
......@@ -30,7 +31,7 @@ function c101102033.initial_effect(c)
end
function c101102033.repfilter(c,tp)
return c:IsSetCard(0x24d) and c:IsType(TYPE_FUSION) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c101102033.desfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x24d)
......@@ -62,7 +63,8 @@ function c101102033.fmfilter(c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x24d) and c:IsFaceup() and mg and mg:IsExists(Card.IsType,1,nil,TYPE_EFFECT)
end
function c101102033.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101102033.fmfilter,tp,LOCATION_MZONE,0,1,nil)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and Duel.IsExistingMatchingCard(c101102033.fmfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101102033.disfilter(c)
return aux.disfilter1(c) and c:GetSummonLocation()==LOCATION_EXTRA
......
......@@ -53,7 +53,7 @@ function c101102041.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(atk)
c:RegisterEffect(e1)
local mg=c:GetOverlayGroup()
if not mg:IsExists(c101102041.mgfilter,1,nil) then return end
if mg:IsExists(c101102041.mgfilter,1,nil) then
local exc=aux.ExceptThisCard(e)
local g=Duel.GetMatchingGroup(c101102041.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
for tc in aux.Next(g) do
......@@ -68,6 +68,7 @@ function c101102041.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_ATTACK)
......
......@@ -8,6 +8,7 @@ function c101102061.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,101102061+EFFECT_COUNT_CODE_OATH)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101102061.target)
e1:SetOperation(c101102061.activate)
c:RegisterEffect(e1)
--extra summon
......@@ -20,6 +21,10 @@ function c101102061.initial_effect(c)
e2:SetOperation(c101102061.exop)
c:RegisterEffect(e2)
end
function c101102061.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c101102061.thfilter(c)
if not c:IsAbleToHand() then return false end
return c:IsLocation(LOCATION_DECK) and (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER)
......
......@@ -24,14 +24,14 @@ function c101102073.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c101102073.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
local tc=g:GetFirst()
if tc:GetOriginalLevel()==4 then
if tc:GetOriginalLevel()<=4 then
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
end
function c101102073.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:GetOriginalLevel()==4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:GetOriginalLevel()<=4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,101102173,0x24d,0x4011,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) and Duel.SelectYesNo(tp,aux.Stringid(101102073,0)) then
Duel.BreakEffect()
local token=Duel.CreateToken(tp,101102173)
......
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