Commit e5215649 authored by 大崎甜花's avatar 大崎甜花 Committed by GitHub

Merge pull request #5 from purerosefallen/master

Pre-Backup
parents d584cf7c 0fb03c4a
......@@ -97,7 +97,6 @@ function c1110114.op3(e,tp,eg,ep,ev,re,r,rp)
while tc do
tc:AddMonsterAttribute(TYPE_EFFECT+TYPE_SPIRIT,ATTRIBUTE_LIGHT,RACE_PSYCHO,3,0,0)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
tc:AddMonsterAttributeComplete()
local e3_2=Effect.CreateEffect(c)
e3_2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3_2:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -110,7 +109,6 @@ function c1110114.op3(e,tp,eg,ep,ev,re,r,rp)
local nc=ng:GetFirst()
nc:AddMonsterAttribute(TYPE_EFFECT+TYPE_SPIRIT,ATTRIBUTE_LIGHT,RACE_PSYCHO,3,0,0)
Duel.SpecialSummonStep(nc,0,tp,tp,true,false,POS_FACEUP)
nc:AddMonsterAttributeComplete()
local e3_2=Effect.CreateEffect(c)
e3_2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3_2:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -184,15 +184,15 @@ function c11200004.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==tg:GetCount() and e:GetHandler():IsRelateToEffect(e) then
sg:AddCard(e:GetHandler())
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT+REASON_RETURN)
end
end
function c11200004.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_GRAVE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED+LOCATION_GRAVE ,LOCATION_REMOVED+LOCATION_GRAVE,1,e:GetHandler())
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED ,LOCATION_REMOVED,1,e:GetHandler())
and e:GetHandler():IsAbleToRemove() end
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED+LOCATION_GRAVE ,LOCATION_REMOVED+LOCATION_GRAVE,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,3,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c11200004.reop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -125,7 +125,6 @@ function c11200018.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:GetFirst()
tc:AddMonsterAttribute(TYPE_NORMAL,ATTRIBUTE_LIGHT,RACE_BEAST,4,1100,1100)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
tc:AddMonsterAttributeComplete()
Duel.SpecialSummonComplete()
end
end
......
......@@ -7,7 +7,7 @@ function c11200103.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,11200103)
e1:SetCondition(c11200103.con)
......
......@@ -59,11 +59,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local zone=e:GetHandler():GetLinkedZone(tp)
local lt=c:GetLinkedGroupCount()
local ft=2-lt
if c:GetSequence()>4 then ft=3-lt end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
local tg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil,e,tp,zone)
if tg:GetCount()==0 or ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Group.CreateGroup()
while tg:GetCount()>0 and ft>0 do
......
......@@ -3,7 +3,7 @@ if not pcall(function() require("expansions/script/c33310023") end) then require
local m=33310008
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableUnsummonable()
--c:EnableUnsummonable()
--pendulum summon
aux.EnablePendulumAttribute(c,true)
--to hand
......
......@@ -50,8 +50,11 @@ function cm.rcon(e,tp,eg,ep,ev,re,r,rp)
and (r & REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ)
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local min=ev&0xffff
local max=(ev>>16)&0xffff
Duel.Hint(HINT_CARD,0,e:GetHandler():GetOriginalCode())
e:GetHandler():RegisterFlagEffect(m,0x1fe1000+RESET_PHASE+PHASE_END,0,1)
return max
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
......
......@@ -78,10 +78,11 @@ function cm.rcon(e,tp,eg,ep,ev,re,r,rp)
return (r & REASON_COST)~=0 and re:GetHandler()==e:GetHandler() and re:IsHasType(0x7e0) and Duel.IsExistingMatchingCard(cm.retfilter,tp,LOCATION_REMOVED,0,ct,nil)
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=(ev & 0xffff)
local min=ev&0xffff
local max=(ev>>16)&0xffff
Duel.Hint(HINT_CARD,0,e:GetOwner():GetOriginalCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.retfilter,tp,LOCATION_REMOVED,0,ct,ct,nil)
local g=Duel.SelectMatchingCard(tp,cm.retfilter,tp,LOCATION_REMOVED,0,min,max,nil)
local des=g:IsExists(Card.IsType,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and 0 or 2
Duel.SendtoDeck(g,nil,des,REASON_COST)
return Duel.SendtoDeck(g,nil,des,REASON_COST)
end
--克罗萨斯·马格纳
local m=47570400
local c47570400=_G["c"..m]
function c47570400.initial_effect(c)
--fusion material
c:EnableReviveLimit()
......@@ -142,9 +140,6 @@ function c47570400.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
end
function c47570400.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c47570400.gfilter(c)
return c:IsFaceup()
end
......@@ -186,10 +181,9 @@ function c47570400.repop(e,tp,eg,ep,ev,re,r,rp)
c:CancelToGrave(false)
end
Duel.Hint(HINT_SELECTMSG,tp,HINGMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c47570400.ccfilter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c47570400.ccfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0
if tc and Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
......@@ -200,6 +194,9 @@ function c47570400.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
end
function c47570400.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c47570400.rmcfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
end
......
......@@ -2,7 +2,7 @@
function c65010107.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65010107,1))
e0:SetDescription(aux.Stringid(65010107,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
......
......@@ -37,7 +37,7 @@ function c65010124.initial_effect(c)
c:RegisterEffect(e4)
end
function c65010124.notgtg(e,c)
return c:IsFaceup() and c:IsSetCard(0x9da0) and not c==e:GetHandler()
return c:IsFaceup() and c:IsSetCard(0x9da0) and c~=e:GetHandler()
end
function c65010124.atkcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
......
......@@ -66,7 +66,7 @@ function c65020025.detg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c65020025.delimit(e,ep,tp)
return ep==tp and not e:IsHasType(EFFECT_TYPE_ACTIVATE)
return ep==tp
end
function c65020025.deop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil)
......@@ -83,7 +83,7 @@ function c65020025.wintg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c65020025.winop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local num=e:GetHandler():GetCounter(0x11da)>0
local num=e:GetHandler():GetCounter(0x11da)
local lp=Duel.GetLP(1-tp)
e:GetHandler():RemoveCounter(tp,0x11da,num,REASON_EFFECT)
Duel.SetLP(1-tp,lp-num*1000)
......
......@@ -83,9 +83,16 @@ function Kaguya.EquipCommonEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(function(e,te)
return te:GetOwner()~=e:GetOwner()
end)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DISABLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
end
......@@ -25,7 +25,7 @@ function cm.initial_effect(c)
end)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(function(e,c)
return c:IsControler(1-e:GetHandlerPlayer())
return c and c:IsControler(1-e:GetHandlerPlayer())
end)
c:RegisterEffect(e2)
end
......
......@@ -60,12 +60,10 @@ end
function c81011111.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c81011111.bafilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......
......@@ -26,7 +26,7 @@ function c81041000.initial_effect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,81041000)
e3:SetCountLimit(1,81041000+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c81041000.drcon)
e3:SetTarget(c81041000.drtg)
e3:SetOperation(c81041000.drop)
......
......@@ -57,8 +57,8 @@ function c81041006.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>c:GetOriginalLevel()
end
function c81041006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c4931121.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c4931121.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81041006.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c81041006.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c81041006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -75,15 +75,14 @@ function c9980193.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(def/2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetValue(c9980193.aclimit)
e3:SetReset(RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
tc=tg:GetNext()
tc:RegisterEffect(e3,tp)
end
end
function c9980193.aclimit(e,re,tp)
......
......@@ -87,7 +87,7 @@ function c9980573.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcbca))
e2:SetReset(RESET_PHASE+PHASE_END)
c:RegisterEffect(e2,tp)
tc:RegisterEffect(e2)
Duel.RegisterFlagEffect(tp,9980573,RESET_PHASE+PHASE_END,0,1)
end
function c9980573.filter1(c,e,tp)
......
......@@ -79,7 +79,6 @@ function c9980590.op(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
Duel.RegisterEffect(e2,tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
function c9980590.filter1(e,c)
return c:IsSetCard(0x6bca)
......
......@@ -100,6 +100,7 @@ function c9980599.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c9980599.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -64,7 +64,7 @@ function c9980614.atkfilter(c)
return c:IsSetCard(0x6bcb) and c:IsType(TYPE_MONSTER)
end
function c9980614.atkup(e,c)
local g=Duel.GetMatchingGroup(c9980614.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE+LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c9980614.atkfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetCode)*100
end
function c9980614.eqfilter(c)
......
--戈尔贡三姐妹
function c9980706.initial_effect(c)
c:EnableReviveLimit()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -30,7 +30,6 @@ function c9980710.initial_effect(c)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCondition(c9980710.effcon)
e2:SetTarget(c9980710.filter)
e2:SetValue(aux.TRUE)
c:RegisterEffect(e2)
......@@ -62,9 +61,6 @@ function c9980710.counter(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1009,ct)
end
end
function c9980710.effcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c9980710.filter(e,c)
return (c:IsAttackBelow(500) or c:IsDefenseBelow(500)) and c:IsFaceup() and not c:IsSetCard(0xbc8) and not c:IsImmuneToEffect(e) and c:IsDestructable()
end
......
--丁玲丁玲
function c9980717.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c9980717.sumsuc)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetOperation(c9980717.sumsuc)
c:RegisterEffect(e3)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......@@ -14,6 +14,14 @@ function c9980717.initial_effect(c)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(500)
c:RegisterEffect(e3)
--chain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_FZONE)
e1:SetOperation(c9980717.chop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9980717,0))
......@@ -52,6 +60,16 @@ function c9980717.chop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(1)
end
end
function c9980717.chop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct==1 then
e:SetLabel(0)
elseif not Duel.CheckChainUniqueness() then
e:SetLabel(2)
elseif ct>=3 and e:GetLabel()~=2 then
e:SetLabel(1)
end
end
function c9980717.drcon(e,tp,eg,ep,ev,re,r,rp)
local res=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
......
No preview for this file type
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