游民星空 > 攻略秘籍 > 攻略 > 正文

饥荒 全人物解锁及主角自动回血等实用修改教程

2015-01-21 11:28:46 来源:互联网 作者:易宁 我要投稿

第192页:毒龙兵团

展开

一九二.毒龙兵团(装备暗影剑召唤坎普斯士兵)

  1.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\nightsword.lua文件,将inst.components.equippable.dapperness = TUNING.CRAZINESS_MED替换为以下内容:

  local function cancreatelight(staff, caster, target, pos)

  local ground = GetWorld()

  if ground and pos then

  local tile = ground.Map:GetTileAtPoint(pos.x, pos.y, pos.z)

  return tile ~= GROUND.IMPASSIBLE and tile < GROUND.UNDERGROUND

  end

  return false

  end

  local function createlight(staff, target, pos)

  local light = SpawnPrefab("krampus")

  light.Transform:SetPosition(pos.x, pos.y, pos.z)

  local caster = staff.components.inventoryitem.owner

  end

  inst:AddComponent("spellcaster")

  inst.components.spellcaster:SetSpellFn(createlight)

  inst.components.spellcaster:SetSpellTestFn(cancreatelight)

  inst.components.spellcaster.canuseonpoint = true

  inst.components.spellcaster.canusefrominventory = false

  2.用记事本打开游戏目录\data\scripts\prefabs\krampus.lua文件,将下列内容:

  local function OnAttacked(inst, data)

  inst.components.combat:SetTarget(data.attacker)

  --inst.components.combat:ShareTarget(data.attacker, SEE_DIST, function(dude) return dude:HasTag("hound") and not dude.components.health:IsDead() end, 5)

  end

  替换为:

  local function Retarget(inst)

  local newtarget = FindEntity(inst, 20, function(guy)

  returnguy.components.combat and

  inst.components.combat:CanTarget(guy) and

  (guy.components.combat.target == GetPlayer() or GetPlayer().components.combat.target == guy)

  end)

  return newtarget

  end

  local function OnAttacked(inst, data)

  local attacker = data.attacker

  if attacker and attacker:HasTag("player") then

  inst.components.health:SetVal(0)

  else

  inst.components.combat:SetTarget(attacker)

  end

  end

  3.将local brain = require "brains/krampusbrain"替换为local brain = require "brains/abigailbrain"

  4.将下列内容:

  inst:AddComponent("sleeper")

  inst:AddComponent("health")

  inst.components.health:SetMaxHealth(TUNING.KRAMPUS_HEALTH)

  inst:AddComponent("combat")

  inst.components.combat.hiteffectsymbol = "krampus_torso"

  inst.components.combat:SetDefaultDamage(TUNING.KRAMPUS_DAMAGE)

  inst.components.combat:SetAttackPeriod(TUNING.KRAMPUS_ATTACK_PERIOD)

  替换为:

  inst:AddComponent("health")

  inst.components.health:SetMaxHealth(TUNING.KRAMPUS_HEALTH*10)

  inst:AddComponent("follower")

  inst:AddComponent("combat")

  inst.components.combat.hiteffectsymbol = "krampus_torso"

  inst.components.combat:SetDefaultDamage(TUNING.KRAMPUS_DAMAGE*10)

  inst.components.combat:SetAttackPeriod(TUNING.KRAMPUS_ATTACK_PERIOD*.1)

  inst.components.combat:SetRetargetFunction(3, Retarget)

  inst.AnimState:Hide("SACK")

  inst.AnimState:Show("ARM")

  即可装备暗影剑时,在空地上按鼠标右键召唤坎普斯士兵。坎普斯经过了深度改造,不会偷东西,只会为主角浴血奋战。不想要坎普斯跟随时,杀死它即可,它虽然强悍,但主角对它一击毙命

更多相关内容请关注:饥荒专区

责任编辑:Shy夏夏

上一页 191 192 193 194 195 196 197 198 199 200 201 下一页
友情提示:支持键盘左右键“← →”翻页

本文是否解决了您的问题

文章内容导航
游民星空APP
随手浏览游戏攻略
code
攻略合集
单机游戏下载
休闲娱乐
综合热点资讯
游民星空联运游戏