diff --git a/l4d2_tank_draw/cfg/l4d2_tank_draw.cfg b/l4d2_tank_draw/cfg/l4d2_tank_draw.cfg index b71e2ac..7476148 100644 --- a/l4d2_tank_draw/cfg/l4d2_tank_draw.cfg +++ b/l4d2_tank_draw/cfg/l4d2_tank_draw.cfg @@ -232,7 +232,7 @@ l4d2_tank_draw_new_witch_chance "30" // Probability of receiving no reward // - // Default: "10" -l4d2_tank_draw_no_price_chance "10" +l4d2_tank_draw_no_prize_chance "10" // 重置所有人血量概率(将所有人血量设置为100,清空倒地次数记数) // Probability of resetting all survivors' health to 100 and clearing incapacitation counters diff --git a/l4d2_tank_draw/scripting/l4d2_tank_draw.sp b/l4d2_tank_draw/scripting/l4d2_tank_draw.sp index 4f7cd8f..bfa1f44 100644 --- a/l4d2_tank_draw/scripting/l4d2_tank_draw.sp +++ b/l4d2_tank_draw/scripting/l4d2_tank_draw.sp @@ -119,7 +119,7 @@ public void OnPluginStart() ChanceNewTank = CreateConVar("l4d2_tank_draw_new_tank_chance", "0", "获得tank概率 \nProbability of spawning a new tank", FCVAR_NONE); ChanceNewWitch = CreateConVar("l4d2_tank_draw_new_witch_chance", "0", "获得witch概率 \nProbability of spawning a new witch", FCVAR_NONE); - ChanceNoPrice = CreateConVar("l4d2_tank_draw_no_price_chance", "10", "没有奖励的概率 \nProbability of receiving no reward", FCVAR_NONE); + ChanceNoPrize = CreateConVar("l4d2_tank_draw_no_prize_chance", "10", "没有奖励的概率 \nProbability of receiving no reward", FCVAR_NONE); ChanceReviveAllDead = CreateConVar("l4d2_tank_draw_revive_all_dead_chance", "0", "全体复活概率 \nProbability of reviving all dead survivors", FCVAR_NONE); diff --git a/l4d2_tank_draw/scripting/lib/lib.sp b/l4d2_tank_draw/scripting/lib/lib.sp index b3635f3..6be706f 100644 --- a/l4d2_tank_draw/scripting/lib/lib.sp +++ b/l4d2_tank_draw/scripting/lib/lib.sp @@ -8,7 +8,7 @@ ConVar // Custom ConVars for the plugin ConVar TankDrawEnable, - ChanceNoPrice, + ChanceNoPrize, ChanceIncreaseHealth, ChanceInfiniteAmmo, ChanceInfiniteMelee, diff --git a/l4d2_tank_draw/scripting/lib/lucky_draw.sp b/l4d2_tank_draw/scripting/lib/lucky_draw.sp index 26d9887..63b6ccd 100644 --- a/l4d2_tank_draw/scripting/lib/lucky_draw.sp +++ b/l4d2_tank_draw/scripting/lib/lucky_draw.sp @@ -1,6 +1,6 @@ stock Action LuckyDraw(int victim, int attacker) { - int chanceNoPrice = ChanceNoPrice.IntValue; + int chanceNoPrize = ChanceNoPrize.IntValue; int chanceIncreaseHealth = ChanceIncreaseHealth.IntValue; int chanceInfiniteAmmo = ChanceInfiniteAmmo.IntValue; int chanceInfiniteMelee = ChanceInfiniteMelee.IntValue; @@ -25,7 +25,7 @@ stock Action LuckyDraw(int victim, int attacker) int chanceClearAllSurvivorHealth = ChanceClearAllSurvivorHealth.IntValue; int chanceReviveAllDead = ChanceReviveAllDead.IntValue; - int totalChance = chanceNoPrice + chanceResetAllSurvivorHealth + chanceInfinitePrimaryAmmo + chanceNewWitch + chanceFreezeBomb + chanceTimerBomb + chanceReviveAllDead + chanceNewTank + chanceDisarmSingleSurvivor + chanceDisarmAllSurvivor + chanceDecreaseHealth + chanceClearAllSurvivorHealth + chanceIncreaseHealth + chanceInfiniteAmmo + chanceInfiniteMelee + chanceAverageHealth + chanceKillAllSurvivor + chanceKillSingleSurvivor + chanceDisableGlow; + int totalChance = chanceNoPrize + chanceResetAllSurvivorHealth + chanceInfinitePrimaryAmmo + chanceNewWitch + chanceFreezeBomb + chanceTimerBomb + chanceReviveAllDead + chanceNewTank + chanceDisarmSingleSurvivor + chanceDisarmAllSurvivor + chanceDecreaseHealth + chanceClearAllSurvivorHealth + chanceIncreaseHealth + chanceInfiniteAmmo + chanceInfiniteMelee + chanceAverageHealth + chanceKillAllSurvivor + chanceKillSingleSurvivor + chanceDisableGlow; totalChance += chanceLimitedTimeWorldMoonGravity + chanceMoonGravityOneLimitedTime + chanceWorldMoonGravityToggle + chanceIncreaseGravity; if (totalChance == 0) @@ -44,7 +44,7 @@ stock Action LuckyDraw(int victim, int attacker) int currentChance = 0; // no prize - currentChance += chanceNoPrice; + currentChance += chanceNoPrize; if (random <= currentChance) { CPrintToChatAll("%t", "TankDrawResult_NoPrize", attackerName);