• 饥荒-哈姆雷特 菩萨低眉 (敌人攻击你时角色自动 加满血条、San值,敌人直接死亡)


    注意 修改前 请进行备份

    注意 修改前 请进行备份

    注意 修改前 请进行备份

    1.在需要添加此功能的DLC中 进行修改

    找到 某个DLC下的payler_common.lua文件 (修改前 请备份此文件

    如果哈姆雷特是DLC00003 那么需要在 以下 路径中修改

    DLC00003/scripts/prefabs/player_common.lua
    

    2.然后 用记事本 打开player_common.lua 文件 查找到以下代码

    inst:AddComponent("grue")
    

     

    3.然后将下列代码插入到  inst:AddComponent("grue")的上方

    local function OnAttacked(inst, data)
        inst.components.health:DoDelta(inst.components.health.maxhealth)
        inst.components.sanity:DoDelta(inst.components.sanity.max)
        if data.attacker.components.health then
            data.attacker.components.health:DoDelta(-3000)
        end	
    end
    inst:ListenForEvent("attacked", OnAttacked)

    4.保存

    重新启动饥荒 选择对应的修改后的DLC进行游戏即可

    注意: 如果启动时报错 直接将备份的文件还原

  • 相关阅读:
    string
    auto和decltype
    const限定符
    &(引用) 和 *(指针)
    extern关键字
    关于将函数写入头文件问题(分离式编译)
    poj2154(polya定理+欧拉函数)
    bzoj2115(线性基)
    51nod1832(二叉树/高精度模板+dfs)
    51nod1464(trie + dfs)
  • 原文地址:https://www.cnblogs.com/MainActivity/p/12877026.html
Copyright © 2020-2023  润新知