Commit 7954c285 authored by mercury233's avatar mercury233

fix

parent 6a5a060e
......@@ -32,10 +32,11 @@ function s.filter(c,tp)
return c:IsType(TYPE_FUSION) and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil,c)
end
function s.sfilter(c,tc)
return aux.IsMaterialListCode(fc,c:GetCode())
return aux.IsMaterialListCode(tc,c:GetCode())
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
......@@ -88,6 +89,7 @@ function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
end
return res
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end
......
......@@ -113,7 +113,7 @@ function s.fdestg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function s.fedsop(e,tp,eg,ep,ev,re,r,rp)
function s.fdesop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT)
end
--篝火
--Bonfire
--coded by Lyris
local s, id, o = GetID()
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
......
--Combat Wheel
--coded by CVen00/ToonyBirb using modified outline originally created by XGlitchy30, edited & formatted by Lyris
local s,id=GetID()
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--material
......
......@@ -27,7 +27,7 @@ function s.initial_effect(c)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.desfilter(c, code)
function s.desfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -93,7 +93,7 @@ end
function s.filter(c,e,tp)
return c:IsSetCard(0x21) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
or c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
or c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
......
--地縛戒隷 ジオグリフォン
--Earthbound Servant Geo Gryphon
--coded by Lyris
local s, id, o = GetID()
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--material
......
--地縛牢
--Earthbound Prison
--coded by Lyris
local s, id, o = GetID()
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
......@@ -36,7 +36,8 @@ function s.initial_effect(c)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,2)) then
if Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,2)) then
e:SetCategory(CATEGORY_DISABLE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(s.disop)
......
--フェニックス・ギア・ブレード
--Phoenix Gearblade
--coded by Lyris
local s, id, o = GetID()
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--コード・ハック
--Code Hack
--coded by Lyris
local s, id, o = GetID()
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......
......@@ -12,7 +12,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(LOCATION_EXTRA)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--to grave
......@@ -29,7 +29,7 @@ function s.initial_effect(c)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
......@@ -66,7 +66,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() or Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP)==0 then return end
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -74,16 +74,21 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then Duel.SendtoGrave(tc,REASON_EFFECT) end
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetOwner():GetFlagEffect(id)>0
local c=e:GetHandler()
if c:GetFlagEffect(id)>0 then
return true
else
e:Reset()
return false
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REMOVE_BRAINWASHING)
......@@ -103,6 +108,9 @@ function s.rettg(e,c)
return c==e:GetLabelObject() and c:GetFlagEffect(id)>0
end
function s.reset(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():Reset()
local e1=e:GetLabelObject()
local tc=e1:GetLabelObject()
tc:ResetFlagEffect(id)
e1:Reset()
e:Reset()
end
......@@ -65,8 +65,7 @@ end
function c101202011.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(c101202011.filter,tp,LOCATION_DECK,0,nil)
if tg and Duel.SendtoHand(tg,nil,REASON_EFFECT)~=0 and Duel.ConfirmCards(1-tp,tg)~=0
and Duel.SelectYesNo(tp,aux.Stringid(101202011,2))
and Duel.IsPlayerCanDraw(tp,1) then
and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(101202011,2)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
......@@ -82,6 +81,6 @@ function c101202011.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
......@@ -78,6 +78,7 @@ function c101202037.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -53,7 +53,7 @@ function c101202058.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c101202058.filter(c)
return c:IsSetCard(0x29c) and c:IsAbleToHand()
return c:IsSetCard(0x29c) and c:IsAbleToGrave()
end
function c101202058.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101202058.filter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -44,12 +44,12 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=math.min(e:GetLabel(),Duel.GetLocationCount(tp,LOCATION_MZONE))
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0x161,TYPES_TOKEN_MONSTER,0,0,2,RACE_REPTILE,ATTRIBUTE_DARK) then return end
if ct<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0x161,TYPES_TOKEN_MONSTER,0,0,2,RACE_REPTILE,ATTRIBUTE_DARK) then return end
repeat
local tk=Duel.CreateToken(tp,id+o)
Duel.SpecialSummonStep(tk,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
until ft<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) or not Duel.SelectYesNo(tp,210)
ct=ct-1
until ct<=0 or Duel.IsPlayerAffectedByEffect(tp,59822133) or not Duel.SelectYesNo(tp,210)
Duel.SpecialSummonComplete()
end
function s.filter(c)
......
......@@ -14,6 +14,7 @@ function c101202076.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(c101202076.con)
e1:SetTarget(c101202076.tg)
e1:SetOperation(c101202076.op)
......@@ -21,7 +22,6 @@ function c101202076.initial_effect(c)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101202076,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -41,13 +41,12 @@ function c101202076.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101202076.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
c:RegisterFlagEffect(101202076,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c101202076.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101202076.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101202076.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
e:SetLabel(g:GetFirst():GetOriginalCode())
......
......@@ -60,7 +60,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if ct>2 then
Duel.BreakEffect()
if Duel.Damage(1-tp,800,REASON_EFFECT)>0 and Duel.GetLP(1-tp)>0 then
local g=Duel.GetFieldCard(tp,LOCATION_MZONE,LOCATION_MZONE)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
......
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