Marc
  • Marc
  • Advanced Member Topic Starter
2020-12-14T20:19:15Z
I used Command Knight & Elemental Hero Heat for this card but neither effects are working.

Does anyone have a clue why?

This card gains 300 ATK for all Beast-Warrior monsters you control. Your opponent cannot target Beast-Warrior for attacks, except this one.
Quote:

--Werewolf - Alpha
local s,id=GetID()
function s.initial_effect(c)
--cannot select battle target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetValue(s.atlimit)
c:RegisterEffect(e1)
function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(s.val)
c:RegisterEffect(e2)
end
function c20130000.filter(c)
return c:IsRace(RACE_BEASTWARRIOR)
end
function s.val(e,c)
return Duel.GetMatchingGroupCount(aux.FilterFaceupFunction(c:IsRace(RACE_BEASTWARRIOR)),c:GetControler(),LOCATION_MZONE,0,nil)*300
end
end

Haku_Yowane
2020-12-15T03:44:19Z
You can try this one:

--Werewolf - Alpha
local s,id=GetID()
function s.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
--cannot be battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(s.bttg)
c:RegisterEffect(e2)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR)
end
function s.atkval(e,c)
return Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)*300
end
function s.bttg(e,c)
return c~=e:GetHandler() and c:IsFaceup() and c:IsRace(RACE_BEASTWARRIOR)
end

Marc
  • Marc
  • Advanced Member Topic Starter
2020-12-15T13:53:12Z
That worked. Thanks Haku!
Haku_Yowane
2020-12-16T03:51:17Z
No problem, glad to be help