游戏王残局简化版

c0.lua at [c55787c7ac]
Login

c0.lua at [c55787c7ac]

File script/c0.lua artifact f9662a6a72 part of check-in c55787c7ac


local str = {}
local fun = {}

local cache_1
local cache_2
local cache_3



_G["通关邀请"] = function()
  local effect_1
  effect_1 = Effect.GlobalEffect()
  effect_1:SetType(EFFECT_TYPE_FIELD
    + EFFECT_TYPE_CONTINUOUS)
  effect_1:SetCode(EVENT_DAMAGE)
  function cache_1()
    cache_1 = Duel.GetLP(1)
    if cache_1 <= 0 then
      cache_1 = true
    else
      cache_1 = false
      end
    return cache_1
    end
  effect_1:SetCondition(cache_1)
  function cache_1()
    Debug.ShowHint("残局群181175613")
    return
    end
  effect_1:SetOperation(cache_1)

  Duel.RegisterEffect(effect_1
    , 0)
  end

fun["是否效果卡"] = function(card)
  local cache_1
  local cache_2
  local cache_3

  cache_1 = Card.IsType(card, TYPE_SPELL)
  cache_2 = Card.IsType(card, TYPE_TRAP)
  cache_3 = Card.IsType(card, TYPE_EFFECT)

  if cache_1
  or cache_2
  or cache_3 then
    return true
    end
  return false
  end

_G["开局说明"] = function()
  str["我方卡组"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_DECK,0,nil)
  str["我方墓地"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_GRAVE,0,nil)
  str["我方怪兽区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_MZONE,0,nil)
  str["我方手卡"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_HAND,0,nil)
  str["我方灵摆区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_PZONE,0,nil)
  str["我方除外区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_REMOVED,0,nil)
  str["我方额外卡组"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_EXTRA,0,nil)
  str["我方魔陷区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_SZONE,0,nil)
  str["我方超量素材"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,LOCATION_OVERLAY,0,nil)

  str["对方卡组"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_DECK,nil)
  str["对方墓地"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_GRAVE,nil)
  str["对方怪兽区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_MZONE,nil)
  str["对方手卡"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_HAND,nil)
  str["对方灵摆区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_PZONE,nil)
  str["对方除外区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_REMOVED,nil)
  str["对方额外卡组"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_EXTRA,nil)
  str["对方魔陷区"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_SZONE,nil)
  str["对方超量素材"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,0,LOCATION_OVERLAY,nil)

  str["这个残局的效果卡数量"] = 0

  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方卡组"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方墓地"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方怪兽区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方手卡"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方灵摆区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方除外区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方额外卡组"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方魔陷区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["我方超量素材"]

  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方卡组"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方墓地"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方怪兽区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方手卡"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方灵摆区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方除外区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方额外卡组"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方魔陷区"]
  str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + str["对方超量素材"]

  str["开局说明"] = "效果卡:"
  str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]

  Debug.ShowHint(str["开局说明"])
function splimit(e,c,tp,sumtp,sumpos)
  Debug.ShowHint(bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK)
	return bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
	e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
	e1:SetTargetRange(1,1)
	e1:SetTarget(splimit)
	e1:SetReset(RESET_PHASE+PHASE_END)
	Duel.RegisterEffect(e1,tp)
  end