This repository was archived by the owner on Oct 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathc511003079.lua
More file actions
48 lines (48 loc) · 1.71 KB
/
Copy pathc511003079.lua
File metadata and controls
48 lines (48 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--N・ブラック・パンサー
local s,id=GetID()
function s.initial_effect(c)
--copy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43237273,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsType(TYPE_TOKEN) then
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetValue(code)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD_DISABLE,1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e2:SetValue(tc:GetAttack())
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_DEFENSE_FINAL)
e3:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
e3:SetValue(tc:GetDefense())
c:RegisterEffect(e3)
end
end