Commit 2728c4a7 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents 5e52dbed 0433d642
--メタトロンの影霊衣
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
......
--ジュラック・メガロ
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddCodeList(c,id)
--special summon
......
--魔轟神レヴェルゼブル
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
......
--ジェムナイト・ディスパージョン
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddCodeList(c,1264319)
--Activate 1
......
--ジェムナイトマスター・ダイヤ-ディスパージョン
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--fusion material
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x47),3,true)
......
......@@ -21,7 +21,7 @@ function c30888983.cfilter(c,rc)
return c:IsFaceup() and c:IsRace(rc)
end
function c30888983.filter(c)
return Duel.IsExistingMatchingCard(c30888983.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetRace())
return Duel.IsExistingMatchingCard(c30888983.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetRace())
end
function c30888983.condition(e,tp,eg,ep,ev,re,r,rp)
return aux.NegateSummonCondition() and eg:IsExists(c30888983.filter,1,nil)
......
--葬角のカルノヴルス
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
......
......@@ -48,8 +48,8 @@ function s.value(e,c)
return math.max(0,c:GetLevel()-c:GetOriginalLevel())*500
end
function s.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and (aux.IsCodeListed(c,79791878) or c:IsCode(79791878))
and c:IsControler(tp) and c:IsFaceup()
return c:IsOnField() and c:IsControler(tp) and c:IsFaceup()
and (c:IsCode(79791878) or c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,79791878))
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......
......@@ -26,9 +26,14 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.cfilter(c,re)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsReason(REASON_COST) and re:IsActivated()
and (not c:IsPreviousLocation(LOCATION_ONFIELD) or c:GetPreviousTypeOnField()&(TYPE_SPELL+TYPE_TRAP)~=0)
if not c:IsType(TYPE_SPELL+TYPE_TRAP) or not c:IsReason(REASON_COST) then return false end
if c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousTypeOnField()&(TYPE_SPELL+TYPE_TRAP)==0 then return false end
local recode=re:GetCode()
return re:IsActivated()
or recode==EFFECT_TRAP_ACT_IN_HAND
or recode==EFFECT_TRAP_ACT_IN_SET_TURN
or recode==EFFECT_QP_ACT_IN_NTPHAND
or recode==EFFECT_QP_ACT_IN_SET_TURN
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,re)
......
--光なき影 ア=バオ・ア・クゥー
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
......
--オルフェゴール・ガラテアi
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--link summon
aux.AddCodeList(c,90351981)
......
--影霊衣の神魔鏡
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
--影霊衣の魔剣士 アバンス
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--ジェムナイト・ネピリム
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
......
--ジュラック・アステロ
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddCodeList(c,17548456)
--synchro summon
......
--魔轟神界の復活
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
......@@ -15,11 +15,14 @@ end
function c5990062.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_ONFIELD,0)
g:RemoveCard(e:GetHandler())
if chk==0 then return g:GetCount()>0 and not g:IsExists(c5990062.cfilter,1,nil) end
if chk==0 then return g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_ONFIELD)>0
and not g:IsExists(c5990062.cfilter,1,nil) end
Duel.SendtoGrave(g,REASON_COST)
end
function c5990062.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
if chk==0 then return Duel.GetLP(tp)~=Duel.GetLP(1-tp)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end
function c5990062.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
......
--魔轟神獣ベヒルモス
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--synchro summon
local e1=Effect.CreateEffect(c)
......
--宵星の騎士エンリルギルス
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
......
......@@ -42,7 +42,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsFaceupEx() and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
return c:IsType(TYPE_XYZ) and c:IsFaceup()
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -33,5 +33,5 @@ function c86466163.xyztg(e,c)
return c:IsLevelBelow(4) and c:IsSetCard(0x9c)
end
function c86466163.xyzlv(e,c,rc)
return 0x30050000+c:GetLevel()
return 0x30050000|aux.GetCappedXyzLevel(c)
end
--影霊衣の舞巫女 エミリア
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......
--ジェムナイト・ヴォイドルーツ
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddCodeList(c,1264319)
--special summon
......
--ジュラック・ヴォルケーノ
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddCodeList(c,17548456)
--Activate
......
......@@ -5,8 +5,8 @@ function c91110378.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetValue(c91110378.xyz_level)
e1:SetCode(EFFECT_XYZ_MIN_COUNT)
e1:SetValue(3)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
......@@ -24,9 +24,6 @@ function c91110378.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c91110378.xyz_level(e,c,rc)
return 0x3000+c:GetLevel()
end
function c91110378.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x86) and c:IsSummonPlayer(tp)
end
......
--ジュラック・メガロ
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
aux.AddCodeList(c,id)
--spsummon
......
--魔轟神ガミュジン
local s,id,o=GetID()
---@param c Card
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x35),aux.NonTuner(nil),1)
......
......@@ -3,6 +3,7 @@ MIN_ID =128 --0x80, by DataManager::GetDesc()
MAX_ID =268435455 --28 bits, by DataManager::GetDesc()
MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_PARAMETER =0xffff
MAX_XYZ_LEVEL =0x0fff
--Locations 区域
LOCATION_DECK =0x01 --卡组
LOCATION_HAND =0x02 --手牌
......@@ -180,7 +181,7 @@ STATUS_CHAINING =0x10000 --正在連鎖串中
STATUS_SUMMON_DISABLED =0x20000 --召唤无效後尚未移動
STATUS_ACTIVATE_DISABLED =0x40000 --发动无效後尚未移動
STATUS_EFFECT_REPLACED =0x80000 --效果被替代(红莲霸权)
STATUS_FUTURE_FUSION =0x100000 --未来融合特殊召唤(不触发融合素材效果)
STATUS_FLIP_SUMMONING =0x100000 --反转召唤中
STATUS_ATTACK_CANCELED =0x200000 --若其為攻擊者,則攻擊中止
STATUS_INITIALIZING =0x400000 --正在初始化
STATUS_TO_HAND_WITHOUT_CONFIRM =0x800000 --非公开的卡被效果加入手卡但未给对方确认
......@@ -191,6 +192,7 @@ STATUS_ACT_FROM_HAND =0x8000000 --從手牌发动
STATUS_OPPO_BATTLE =0x10000000 --和對手的怪兽戰鬥
STATUS_FLIP_SUMMON_TURN =0x20000000 --在本回合反转召唤
STATUS_SPSUMMON_TURN =0x40000000 --在本回合特殊召唤
STATUS_FLIP_SUMMON_DISABLED =0x80000000 --反转召唤被无效
--Assume
ASSUME_CODE =1
ASSUME_TYPE =2
......@@ -604,6 +606,7 @@ EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召
EFFECT_TUNER =369 --同调召唤时可以当作调整(百檎龙-苹果鳞虫)
EFFECT_KAISER_COLOSSEUM =370 --皇帝斗技场
EFFECT_REPLACE_DAMAGE =371 --伤害由特定行动代替
EFFECT_XYZ_MIN_COUNT =372 --只能用在X只以上的超量召唤
EFFECT_FLAG_EFFECT =0x20000000 --标记类效果,即RegisterFlagEffect()创建的效果
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
......
......@@ -418,6 +418,7 @@ end
--Xyz Summon
function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,alterop)
return alterf(c,e,tp,xyzc) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
and not c:IsHasEffect(EFFECT_XYZ_MIN_COUNT)
and Auxiliary.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and (not alterop or alterop(e,tp,0,c))
end
---Xyz monster, lv k*n
......@@ -649,7 +650,15 @@ function Auxiliary.XyzLevelFreeFilter(c,xyzc,f)
return (not c:IsOnField() or c:IsFaceup()) and c:IsCanBeXyzMaterial(xyzc) and (not f or f(c,xyzc))
end
function Auxiliary.XyzLevelFreeGoal(g,tp,xyzc,gf)
return (not gf or gf(g)) and Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
if Duel.GetLocationCountFromEx(tp,tp,g,xyzc)<=0 then return false end
if gf and not gf(g) then return false end
local lg=g:Filter(Card.IsHasEffect,nil,EFFECT_XYZ_MIN_COUNT)
for c in Auxiliary.Next(lg) do
local le=c:IsHasEffect(EFFECT_XYZ_MIN_COUNT)
local ct=le:GetValue()
if #g<ct then return false end
end
return true
end
function Auxiliary.XyzLevelFreeCondition(f,gf,minct,maxct)
return function(e,c,og,min,max)
......
......@@ -1476,6 +1476,15 @@ function Auxiliary.GetCappedLevel(c)
end
end
--
function Auxiliary.GetCappedXyzLevel(c)
local lv=c:GetLevel()
if lv>MAX_XYZ_LEVEL then
return MAX_XYZ_LEVEL
else
return lv
end
end
--
function Auxiliary.GetCappedAttack(c)
local x=c:GetAttack()
if x>MAX_PARAMETER then
......
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