Commit 6211d384 authored by gggg's avatar gggg

update nanahira lib

parent ae8efffc
Pipeline #35160 passed with stages
in 58 minutes and 28 seconds
......@@ -847,10 +847,10 @@ end
function cm.PrismProcCondition(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.PrismProcFilter,1,nil,tp)
return Duel.CheckReleaseGroup(tp,cm.PrismProcFilter,1,nil,tp)
end
function cm.PrismProcOperation(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.PrismProcFilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.PrismProcFilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
--prism xyz multi-count xyz proc
......@@ -1178,7 +1178,6 @@ function cm.NanahiraTrap(c,...)
if te:GetCode()==EVENT_FREE_CHAIN then
e1:SetHintTiming(0x1e0)
end
e1:SetCountLimit(1)
e1:SetCost(cm.SelfReleaseCost)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
......@@ -2602,3 +2601,31 @@ function cm.GetPZoneCount(tp,g)
end
return res
end
function cm.HelltakerFilter(c)
return c:GetBaseAttack()==1700 and c:GetBaseDefense()==1400 and c:IsRace(RACE_FIEND) and c:IsType(TYPE_MONSTER)
end
function cm.HelltakerCommonEffect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(35952884,1))
e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,nil,tp,POS_FACEDOWN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil,tp,POS_FACEDOWN)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end)
c:RegisterEffect(e4)
return e4
end
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