松鼠藏匿点的无法无天之地

松鼠藏匿点的无法无天之地

无法无天之地让守卫普遍对犯罪漠不关心。农民们仍然会在你攻击或试图偷窃他们时抱怨,但大多数时候,守卫不会对你采取任何行动。如果他们真的采取行动,放下你的武器(按G键来

游戏玩法

  1. Lawless Land makes guards generally apathetic to crime.

  2. 法外之地使卫兵普遍对犯罪行为漠不关心。

  3. Peasants will still complain if you attack or attempt to steal from them, but most of the time, guards won't take any action against you.

  4. 如果你攻击或试图偷窃平民,他们仍会抱怨,但大多数时候卫兵不会对你采取行动。

  5. If they do, lower your weapons (press G to surrender) and they're likely to shrug it off and let you go free!

  6. 如果他们采取行动,放下武器(按G键投降),他们很可能会耸耸肩放你走!

大多数守卫并不热衷于维护和平与执行法律,但有些守卫会非常认真地对待自己的工作,仍然会与你交战。不过,地方官员拒绝再提出指控,因此你不会因为自己的罪行而面临真正的后果!

安装

将下载内容解压到Data文件夹中。就这样!

已修改的文件

此模组修改了以下文件。其他影响这些文件的模组可能无法良好兼容。

Scripts/Script/ContextData.lua

-- 犯罪系统脚本
local Crime = {}

-- 犯罪类型枚举
Crime.Type = {
    THEFT = 1,          -- 盗窃
    ASSAULT = 2,        -- 袭击
    MURDER = 3,         -- 谋杀
    TRESPASSING = 4,    -- 非法入侵
    VANDALISM = 5       -- 故意破坏
}

-- 犯罪严重程度
Crime.Severity = {
    MINOR = 1,          -- 轻微
    MODERATE = 2,       -- 中等
    SERIOUS = 3,        -- 严重
    FELONY = 4          -- 重罪
}

-- 犯罪记录表
local crimeRecords = {}

-- 记录犯罪
function Crime.commitCrime(characterId, crimeType, severity, location)
    local record = {
        type = crimeType,
        severity = severity,
        location = location,
        timestamp = os.time(),
        witnesses = {}
    }
    
    if not crimeRecords[characterId] then
        crimeRecords[characterId] = {}
    end
    
    table.insert(crimeRecords[characterId], record)
    
    -- 触发犯罪事件
    Event.trigger("CrimeCommitted", {
        perpetrator = characterId,
        crimeType = crimeType,
        severity = severity,
        location = location
    })
    
    return #crimeRecords[characterId]
end

-- 获取角色犯罪记录
function Crime.getCrimeRecords(characterId)
    return crimeRecords[characterId] or {}
end

-- 清除犯罪记录
function Crime.clearRecords(characterId)
    crimeRecords[characterId] = nil
end

-- 计算悬赏金额
function Crime.calculateBounty(characterId)
    local records = Crime.getCrimeRecords(characterId)
    local bounty = 0
    
    for _, record in ipairs(records) do
        local baseAmount = record.severity * 100
        bounty = bounty + baseAmount
    end
    
    return bounty
end

-- 检查是否被通缉
function Crime.isWanted(characterId)
    return Crime.calculateBounty(characterId) > 0
end

return Crime