name: Spirit
card_text: If a player activates "Pot of Greed": Activate this effect; they can draw 1 card. This card must be in face-up Attack Position to activate and to resolve this effect.
external_ids: local CARD_ID_0 = 55144522 --Pot of Greed
  
lua: local CARD_ID_0 = 55144522 --Pot of Greed
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--draw
  	local e2 = Effect.CreateEffect(c)
  	e2:SetCategory(CATEGORY_DRAW)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_CHAINING)
  	e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCondition(s.drcon)
  	e2:SetOperation(s.drop)
  	c:RegisterEffect(e2)
  end
  function s.drcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsAttackPos() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_ID_0)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	if not e:GetHandler():IsAttackPos() or not e:GetHandler():IsRelateToEffect(e) then
  		return
  	end
  	if Duel.IsPlayerCanDraw(rp, 1) and Duel.SelectYesNo(rp, aux.Stringid(id, 0)) then
  		Duel.Draw(rp, 1, REASON_EFFECT)
  	end
  end
  
  
source_text: Spirit
  If a player activates "Pot of Greed": Activate this effect; they can draw 1 card. This card must be in face-up Attack Position to activate and to resolve this effect.
target_text: -- Spirit
  local CARD_ID_0 = 55144522 --Pot of Greed
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--draw
  	local e2 = Effect.CreateEffect(c)
  	e2:SetCategory(CATEGORY_DRAW)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
  	e2:SetCode(EVENT_CHAINING)
  	e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCondition(s.drcon)
  	e2:SetOperation(s.drop)
  	c:RegisterEffect(e2)
  end
  function s.drcon(e, tp, eg, ep, ev, re, r, rp)
  	return e:GetHandler():IsAttackPos() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(CARD_ID_0)
  end
  function s.drop(e, tp, eg, ep, ev, re, r, rp)
  	if not e:GetHandler():IsAttackPos() or not e:GetHandler():IsRelateToEffect(e) then
  		return
  	end
  	if Duel.IsPlayerCanDraw(rp, 1) and Duel.SelectYesNo(rp, aux.Stringid(id, 0)) then
  		Duel.Draw(rp, 1, REASON_EFFECT)
  	end
  end
  
  