Commit 634a62da authored by JoyJ's avatar JoyJ

update

parent 848d91e4
......@@ -53,7 +53,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
--影灵衣 0xb4
if c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and not c:IsCode(21105106) then
CUNGUI.InitNekroz(c)
elseif c:IsSetCard(0x7c) then
elseif c:IsSetCard(0x7c) and not c:IsType(TYPE_NORMAL) then
CUNGUI.InitRedEye(c)
elseif c:IsSetCard(0x109) then
CUNGUI.InitWeather(c)
......@@ -62,6 +62,79 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
end
end
--永火本家怪兽增加效果(包括百眼龙)
--·把手卡的这张卡给对方观看才能发动。这张卡和手卡中【永火】以外的怪兽全部送去墓地。那之后,自己可以抽2张(没有送去墓地的场合也能抽)。
--·多个卡名的此类效果1回合只能处理最多3次。这张卡在墓地的场合,把自己·对方场上1张卡撕碎才能发动。和对方握手。那之后,可以把这张卡特殊召唤,从墓地把1张【永火】魔法·陷阱卡加入手卡。这个效果的发动后,自己不是【永火】怪兽不能特殊召唤,不是同调怪兽不能从额外卡组特殊召唤。
--·只要这张卡在场上表侧表示存在,自己即使基本分变为0也不会败北。
function CUNGUI.InitInfernity(c)
--no lose
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_CANNOT_LOSE_KOISHI)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,0)
e0:SetValue(1)
c:RegisterEffect(e0)
--discard and draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(291414,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DRAW)
e2:SetCost(CUNGUI.infdrcost)
e2:SetTarget(CUNGUI.infdrtg)
e2:SetOperation(CUNGUI.infdrop)
c:RegisterEffect(e2)
end
function CUNGUI.infdrcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function CUNGUI.infdrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function CUNGUI.infdrcfilter(c)
return c:IsFaceup() and c:IsLevelAbove(8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
end
function CUNGUI.infdrfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function CUNGUI.infdrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(CUNGUI.infdrcfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(CUNGUI.infdrfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(291414,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,CUNGUI.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--【真红眼】本家卡增加效果(除凡骨黑龙外;包括永续陷阱)
--·只要这张卡在场上存在,自己场上原本是通常怪兽的【真红眼黑龙】的攻击力增加10000点,不受对方卡的效果影响。这个效果不会被无效化。
function CUNGUI.InitRedEye(c)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_ONFIELD)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(CUNGUI.redtg)
e2:SetValue(10000)
c:RegisterEffect(e2)
end
function CUNGUI.redtg(e,c)
return c:IsCode(74677422) and c:IsType(TYPE_NORMAL)
end
--天气本家怪兽增加效果
--·这张卡通常召唤成功的场合才能发动。从卡组把最多2只【天气】怪兽在场上特殊召唤。这个效果的发动后,直到回合结束自己不是【天气】怪兽不能特殊召唤。这个效果不会被无效化。
--·这张卡特殊召唤成功的场合才能发动。选场上1张卡的效果无效化。
......@@ -99,6 +172,44 @@ function CUNGUI.InitWeatherMonster(c)
e2:SetTarget(CUNGUI.weadistg)
e2:SetOperation(CUNGUI.weadisop)
c:RegisterEffect(e2)
--draw
e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(601193,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,601193)
e2:SetCondition(CUNGUI.weadrcon)
e2:SetTarget(CUNGUI.weadrtg)
e2:SetOperation(CUNGUI.weadrop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVED)
c:RegisterEffect(e3)
end
function CUNGUI.weadrcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function CUNGUI.weadrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function CUNGUI.weadrfilter(c,e,tp)
return c:IsSetCard(0x109) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function CUNGUI.weadrop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0
and Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(CUNGUI.weadrfilter,tp,LOCATION_HAND,0,1,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(16024176,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,CUNGUI.weadrfilter,tp,LOCATION_HAND,0,1,1,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function CUNGUI.weadistg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
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