游戏王残局简化版

Artifact [5d3e4ed569]
Login

Artifact [5d3e4ed569]

Artifact 5d3e4ed56919459db888ba034a2981ddfcccec61a331934ad11c007517a505e0:



local str = {}

local cache_1
local cache_2
local cache_3
local cache_4
local cache_5
local cache_6
local cache_7
local cache_8
local cache_9

local i

_G.fun = {}

---------------------------------

str["二解弹窗"] = "QB:「你居然二解了,请加群告诉我怎么二解。」"
str["原解弹窗"] = "残局群181175613"

str["规则"] = ""

str["规则表"] = {}
str["规则表"][3] = "大师3 "
str["规则表"][4] = "新大师 "
str["规则表"][5] = "大师2020 "

str["当前印卡数"] = 1

str["印卡过多的弹窗"] = "印卡过多!"

str["印卡弹窗1"] = "点击对方额外卡组可以进行印卡。\n手卡只能印 "
str["印卡弹窗2"] = " 张。\n最多可以印 "
str["印卡弹窗3"] = " 张"

str["不洗牌"] = false
str["无BP"] = false

str["不洗牌的说明"] = "伪洗牌 "
str["无BP的说明"] = "无BP "

str["开局说明"] = false

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

str["开局添加手卡"] = false
str["选卡的前缀"] = "选"
str["选卡的后缀"] = "卡 "

str["禁格"] = false
str["禁格的前缀"] = "禁"
str["禁格的后缀"] = "格 "

str["效果卡的种类表"] = {}

str["效果卡的种类表"][1] = TYPE_SPELL
str["效果卡的种类表"][2] = TYPE_TRAP
str["效果卡的种类表"][3] = TYPE_EFFECT

str["无效果灵摆怪兽表"] = {}

str["无效果灵摆怪兽表"][1] = 28363749
str["无效果灵摆怪兽表"][2] = 19474136
str["无效果灵摆怪兽表"][3] = 17390179
str["无效果灵摆怪兽表"][4] = 83980492

cache_1 = 0

cache_1 = cache_1 + LOCATION_HAND
cache_1 = cache_1 + LOCATION_MZONE
cache_1 = cache_1 + LOCATION_SZONE
cache_1 = cache_1 + LOCATION_GRAVE
cache_1 = cache_1 + LOCATION_REMOVED

str["除卡组与额外卡组以外的区域"] = cache_1

cache_1 = cache_1 + LOCATION_DECK
cache_1 = cache_1 + LOCATION_EXTRA

str["所有区域"] = cache_1

---------------------------------

fun["Debug.ReloadFieldBegin"] = Debug.ReloadFieldBegin

Debug.ReloadFieldBegin = function(str_1, str_2) --{
  
  str["不洗牌"] = str_1 & DUEL_PSEUDO_SHUFFLE
  
  str["无BP"] = str_1 & DUEL_ATTACK_FIRST_TURN
  
  if str_2 then --{
    
    str["规则"] = str["规则表"][str_2]
    
    --}
    
  else --{
    
    str["规则"] = str["规则表"][5]
    
    end --}
    
  fun["Debug.ReloadFieldBegin"](str_1, str_2)
  
  end --}
  
fun["aux.BeginPuzzle"] = aux.BeginPuzzle

aux.BeginPuzzle = function() --{
  
  fun["aux.BeginPuzzle"]()
  
  fun["开局说明"]()
  
  fun["通关邀请"]()
  
  end --}
  
fun["通关邀请"] = function() --{
  
  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 --{
      
      if cache_1 == 0 then --{
        
        --}
        
      else  --{
        
        Debug.ShowHint(str["二解弹窗"])
        
        end --}
        
      Debug.ShowHint(str["原解弹窗"])
      
      --}
      
    else --{
      
      return false
      
      end --}
      
    end --}
    
  effect_1:SetCondition(cache_1)
  
  effect_1:SetOperation(aux.NULL)
  
  Duel.RegisterEffect(effect_1
  , 0)
  
  end --}
  
fun["是否效果卡"] = function(card) --{
  
  cache_1 = #str["效果卡的种类表"]
  
  for i = 1, cache_1 do --{
    
    cache_1 = Card.IsType(card, str["效果卡的种类表"][i])
    
    if cache_1 then --{
      
      return true
      end --}
      
    end --}
    
  cache_1 = Card.IsType(card, TYPE_PENDULUM)
  
  if cache_1 then --{
    
    cache_1 = #str["无效果灵摆怪兽表"]
    
    for i = 1, cache_1 do --{
      
      cache_1 = Card.IsCode(card, str["无效果灵摆怪兽表"][i])
      
      if cache_1 then --{
        
        --}
        
      else  --{
        
        return true
        
        end --}
        
      end --}
      
    end --}
    
  return false
  
  end --}
  
fun["开局说明"] = function() --{
  
  str["这个残局的效果卡数量"] = Duel.GetMatchingGroupCount(fun["是否效果卡"],0,str["所有区域"],str["所有区域"],nil)
  
  cache_1 = Duel.GetOverlayGroup(0, LOCATION_MZONE, LOCATION_MZONE)
  
  for k in aux.Next(cache_1) do --{
    
    cache_1 = fun["是否效果卡"](k)
    
    if cache_1 then --{
      
      str["这个残局的效果卡数量"] = str["这个残局的效果卡数量"] + 1
      
      end --}
      
    end --}
    
  str["开局说明"] = ""
  
  str["开局说明"] = str["开局说明"] .. str["这个残局的效果卡数量"]
  str["开局说明"] = str["开局说明"] .. str["效果卡数量的后缀"]
  
  str["开局说明"] = str["开局说明"] .. str["规则"]
  
  if str["不洗牌"] == 0 then --{
    
    --}
    
  else --{
    
    str["开局说明"] = str["开局说明"] .. str["不洗牌的说明"]
    
    end --}
    
  if str["无BP"] == 0 then --{
    
    str["开局说明"] = str["开局说明"] .. str["无BP的说明"]
    
    end --}
    
  if str["开局添加手卡"] then --{
    
    str["开局说明"] = str["开局说明"] .. str["选卡的前缀"]
    str["开局说明"] = str["开局说明"] .. str["开局添加手卡"]
    str["开局说明"] = str["开局说明"] .. str["选卡的后缀"]
    
    end --}
    
  if str["禁格"] then --{
    
    str["开局说明"] = str["开局说明"] .. str["禁格的前缀"]
    str["开局说明"] = str["开局说明"] .. str["禁格"]
    str["开局说明"] = str["开局说明"] .. str["禁格的后缀"]
    
    end --}
    
  Debug.ShowHint(str["开局说明"])
  
  end --}
  
fun["开局添加手卡"] = function(str_1) --{
  
  str["开局添加手卡"] = str_1
  
  effect_1 = Effect.GlobalEffect()
  
  effect_1:SetType(EFFECT_TYPE_FIELD
  + EFFECT_TYPE_CONTINUOUS)
  
  effect_1:SetCode(EVENT_ADJUST)
  
  effect_1:SetCondition(aux.TRUE)
  
  function cache_1(effect_event
  , player_who_activate_the_effect) --{
    
    str["玩家选定的卡"] = Duel.SelectMatchingCard(player_who_activate_the_effect
    , Card.IsAbleToHand
    , player_who_activate_the_effect
    , LOCATION_DECK
    , 0
    , str_1
    , str_1
    , nil)
    
    Duel.SendtoHand(str["玩家选定的卡"]
    , nil
    , REASON_RULE)
    
    effect_event:Reset()
    
    end --}
    
  effect_1:SetOperation(cache_1)
  
  Duel.RegisterEffect(effect_1
  , 0)
  
  end --}
  
fun["禁格"] = function(str_1) --{
  
  str["禁格"] = str_1
  
  effect_1 = Effect.GlobalEffect()
  
  effect_1:SetCode(EFFECT_USE_EXTRA_MZONE)
  
  effect_1:SetValue(str_1)
  
  Duel.RegisterEffect(effect_1,0)
  
  end --}
  
fun["印卡"] = function(str_1, str_2, str_3) --{
  
  if str_3 then --{
    
    --}
    
  else --{
    
    str_3 = str_2
    
    end --}
    
  str["印卡弹窗1"] = str["印卡弹窗1"] .. str_2
  str["印卡弹窗1"] = str["印卡弹窗1"] .. str["印卡弹窗2"]
  str["印卡弹窗1"] = str["印卡弹窗1"] .. str_3
  str["印卡弹窗1"] = str["印卡弹窗1"] .. str["印卡弹窗3"]
  
  Debug.ShowHint(str["印卡弹窗1"])
  
  effect_1 = Effect.CreateEffect(str_1)
  
  effect_1:SetType(EFFECT_TYPE_IGNITION)
  
  effect_1:SetProperty(EFFECT_FLAG_BOTH_SIDE
  + EFFECT_FLAG_UNCOPYABLE
  + EFFECT_FLAG_CANNOT_NEGATE
  + EFFECT_FLAG_CANNOT_DISABLE)
  
  cache_1 = function() --{
    
    Duel.SetChainLimit(aux.FALSE)
    
    return true
    
    end --}
    
  effect_1:SetTarget(cache_1)
  
  effect_1:SetRange(LOCATION_EXTRA)
  
  function print_hand(effect_event
  , player_who_activate_the_effect) --{
    
    announce_card = Duel.AnnounceCard(player_who_activate_the_effect)
    
    card = Duel.CreateToken(player_who_activate_the_effect
    , announce_card)
    
    if str["当前印卡数"] <= str_2 then --{
      
      str["当前印卡数"] = str["当前印卡数"] + 1
      
      Duel.SendtoHand(card,nil,REASON_RULE)
      
      --}
      
    else --{
      
      if str["当前印卡数"] <= str_3 then --{
        
        str["当前印卡数"] = str["当前印卡数"] + 1
        
        Duel.Remove(card,POS_FACEUP,REASON_RULE)
        
        Duel.SendtoDeck(card,player_who_activate_the_effect,0,REASON_RULE)
        
        --}
        
      else --{
        
        Debug.ShowHint(str["印卡过多的弹窗"])
        
        effect_event:Reset()
        
        end --}
        
      end --}
      
    end --}
    
  effect_1:SetOperation(print_hand)
  
  str_1:RegisterEffect(effect_1)
  
  end --}