Skip to content

Commit

Permalink
Typos, enforce use of English language for variables/constants
Browse files Browse the repository at this point in the history
  • Loading branch information
estralis committed Jul 4, 2023
1 parent af220e9 commit 986c2aa
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion gm/items/id_382_ceilingtrowel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SpecialItem[3] = {"Treasure Chest",true,2830,0,""}
SpecialItem[4] = {"Latent Magic Topaz",false,3525,MagicGem,"Magic Gems"}
SpecialItem[5] = {"Latent Magic Amethyst",false,3519,MagicGem,"Magic Gems"}
SpecialItem[6] = {"Latent Magic Obsidian",false,3524,MagicGem,"Magic Gems"}
SpecialItem[7] = {"Latent Magic Sappire",false,3522,MagicGem,"Magic Gems"}
SpecialItem[7] = {"Latent Magic Sapphire",false,3522,MagicGem,"Magic Gems"}
SpecialItem[8] = {"Latent Magic Ruby",false,3521,MagicGem,"Magic Gems"}
SpecialItem[9] = {"Latent Magic Emerald",false,3523,MagicGem,"Magic Gems"}
SpecialItem[10] = {"Pure Fire",false,2553,0,"Pure Elements"}
Expand Down
84 changes: 42 additions & 42 deletions magic/glypheffects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ local PROBABILITY_DESTROY_ON_END_GOLD = 0.6

local WAIT_TIME_AFTER_EQUIPPING = 120 --seconds after put the jewel on before it can be used

M.EFFEKT_RING_AMETHYST = 1
M.EFFEKT_RING_RUBY = 2
M.EFFEKT_RING_SAPPIRE = 3
M.EFFEKT_RING_OBSIDIAN = 4
M.EFFEKT_RING_EMERALD = 5
M.EFFEKT_RING_TOPAZ = 6
M.EFFEKT_RING_DIAMOND = 7
M.EFFEKT_AMULET_AMETHYST = 8
M.EFFEKT_AMULET_RUBY = 9
M.EFFEKT_AMULET_SAPPIRE = 10
M.EFFEKT_AMULET_OBSIDIAN = 11
M.EFFEKT_AMULET_EMERALD = 12
M.EFFEKT_AMULET_TOPAZ = 13
M.EFFEKT_AMULET_DIAMOND = 14
M.EFFECT_RING_AMETHYST = 1
M.EFFECT_RING_RUBY = 2
M.EFFECT_RING_SAPPHIRE = 3
M.EFFECT_RING_OBSIDIAN = 4
M.EFFECT_RING_EMERALD = 5
M.EFFECT_RING_TOPAZ = 6
M.EFFECT_RING_DIAMOND = 7
M.EFFECT_AMULET_AMETHYST = 8
M.EFFECT_AMULET_RUBY = 9
M.EFFECT_AMULET_SAPPHIRE = 10
M.EFFECT_AMULET_OBSIDIAN = 11
M.EFFECT_AMULET_EMERALD = 12
M.EFFECT_AMULET_TOPAZ = 13
M.EFFECT_AMULET_DIAMOND = 14

local function consumeGlyph(item, user, number)
local itemName
Expand Down Expand Up @@ -113,7 +113,7 @@ local function effectRepel(user)
local isFired
local parameter
local isDestroyed
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_AMULET_OBSIDIAN)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_AMULET_OBSIDIAN)
if user:increaseAttrib("hitpoints", 0) > HITPOINT_LIMIT then
if isFired then
local hitpointCost = math.floor(HITPOINT_FAKTOR/parameter)
Expand Down Expand Up @@ -183,7 +183,7 @@ function M.effectOnFight(attacker,defender)
local isDestroyed

local MOVE_POINT_BASE = 10
isFired,parameter = M.effectUse(attacker,M.EFFEKT_RING_AMETHYST)
isFired,parameter = M.effectUse(attacker,M.EFFECT_RING_AMETHYST)

if isFired then
if effectRepel(defender) then
Expand All @@ -194,7 +194,7 @@ function M.effectOnFight(attacker,defender)
end
end

isFired,parameter = M.effectUse(attacker,M.EFFEKT_AMULET_AMETHYST)
isFired,parameter = M.effectUse(attacker,M.EFFECT_AMULET_AMETHYST)
if isFired then
if effectRepel(defender) then
world:gfx(globalvar.gfxFIZZLE,defender.pos)
Expand All @@ -211,7 +211,7 @@ function M.effectOnFight(attacker,defender)
local duration
local foundEffect
local paralysisEffect
isFired,parameter,isDestroyed = M.effectUse(defender,M.EFFEKT_AMULET_EMERALD)
isFired,parameter,isDestroyed = M.effectUse(defender,M.EFFECT_AMULET_EMERALD)
if isFired then
if effectRepel(attacker) then
world:gfx(globalvar.gfxFIZZLE,attacker.pos)
Expand All @@ -238,7 +238,7 @@ function M.effectOnFight(attacker,defender)
local MAX_REDUCTION = 30
local mpReductionEffect
local totalReduction
isFired,parameter,isDestroyed = M.effectUse(attacker,M.EFFEKT_RING_EMERALD)
isFired,parameter,isDestroyed = M.effectUse(attacker,M.EFFECT_RING_EMERALD)
if isFired then
if effectRepel(defender) then
world:gfx(globalvar.gfxFIZZLE,defender.pos)
Expand All @@ -262,7 +262,7 @@ function M.effectOnFight(attacker,defender)
end

local flameDuration
isFired = M.effectUse(attacker,M.EFFEKT_RING_RUBY)
isFired = M.effectUse(attacker,M.EFFECT_RING_RUBY)
if isFired then
if effectRepel(defender) then
world:gfx(globalvar.gfxFIZZLE,defender.pos)
Expand All @@ -275,7 +275,7 @@ function M.effectOnFight(attacker,defender)
end

local FLAME_ATTACKER_S = 2
isFired,parameter = M.effectUse(defender,M.EFFEKT_AMULET_RUBY)
isFired,parameter = M.effectUse(defender,M.EFFECT_AMULET_RUBY)
if isFired then
if effectRepel(attacker) then
world:gfx(globalvar.gfxFIZZLE,attacker.pos)
Expand All @@ -293,7 +293,7 @@ function M.effectOnFight(attacker,defender)
local HP_FAKTOR_ENEMY = 1.5
local hpCosts
if attacker:increaseAttrib("hitpoints", 0) > HP_LIMIT then
isFired,parameter = M.effectUse(attacker,M.EFFEKT_RING_OBSIDIAN)
isFired,parameter = M.effectUse(attacker,M.EFFECT_RING_OBSIDIAN)
if isFired then
world:gfx(globalvar.gfxBLOOD,attacker.pos)
world:gfx(globalvar.gfxBLOOD,defender.pos)
Expand All @@ -307,7 +307,7 @@ function M.effectOnFight(attacker,defender)

local DISTANCE_BASE_ATTACK = 2
local effectiveDistance
isFired,parameter,isDestroyed = M.effectUse(attacker,M.EFFEKT_RING_SAPPIRE)
isFired,parameter,isDestroyed = M.effectUse(attacker,M.EFFECT_RING_SAPPHIRE)
if isFired then
if effectRepel(defender) then
world:gfx(globalvar.gfxFIZZLE,defender.pos)
Expand All @@ -322,7 +322,7 @@ function M.effectOnFight(attacker,defender)
end

local DISTANCE_BASE_DEFEND = 2
isFired,parameter,isDestroyed = M.effectUse(defender,M.EFFEKT_AMULET_SAPPIRE)
isFired,parameter,isDestroyed = M.effectUse(defender,M.EFFECT_AMULET_SAPPHIRE)
if isFired then
if effectRepel(attacker) then
world:gfx(globalvar.gfxFIZZLE,attacker.pos)
Expand All @@ -341,7 +341,7 @@ function M.effectOnCraftingTime(user)
local CRAFTING_TIME_IMPROVEMENT = 0.05
local craftingTime = 1

local isFired, parameter = M.effectUse(user,M.EFFEKT_RING_AMETHYST)
local isFired, parameter = M.effectUse(user,M.EFFECT_RING_AMETHYST)
if isFired then
craftingTime = 1 - parameter * CRAFTING_TIME_IMPROVEMENT
world:gfx(globalvar.gfxSPELL,user.pos)
Expand All @@ -356,7 +356,7 @@ function M.effectOnRepairTime(user)
local isDestroyed
local craftingTime = 1

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_AMULET_AMETHYST)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_AMULET_AMETHYST)
if isFired then
craftingTime = 1 - parameter * REPAIR_TIME_IMPROVEMENT
world:gfx(globalvar.gfxSPELL,user.pos)
Expand All @@ -374,7 +374,7 @@ function M.effectOnUserRepairQuality(user,item)
local isDestroyed
local improvementValue = 0

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_AMULET_TOPAZ)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_AMULET_TOPAZ)
if isFired then
world:gfx(globalvar.gfxDEMFIRE,user.pos)
if not isDestroyed then
Expand All @@ -387,7 +387,7 @@ function M.effectOnUserRepairQuality(user,item)
local workbenchPos = common.GetFrontPosition(user)
local playerInSight = world:getPlayersInRangeOf(workbenchPos,1)
if #playerInSight > NUMBER_OF_HELPER then
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_AMULET_RUBY)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_AMULET_RUBY)
if isFired then
if not isDestroyed then
common.InformNLS(user,"Mit einer Person neben dir arbeitest du konzentrierter. Die Qualität deiner Arbeit wird besser.",
Expand All @@ -404,7 +404,7 @@ function M.effectOnUserRepairQuality(user,item)

local CHARGES_ON_DIAMOND = 4
local PROBABILITY_ON_DIAMOND = 0.5
isFired, parameter = M.effectUse(user,M.EFFEKT_RING_DIAMOND,CHARGES_ON_DIAMOND,PROBABILITY_ON_DIAMOND)
isFired, parameter = M.effectUse(user,M.EFFECT_RING_DIAMOND,CHARGES_ON_DIAMOND,PROBABILITY_ON_DIAMOND)
if isFired then
world:gfx(globalvar.gfxSCOTTY,user.pos)
item:setData("craftedBy",user.name)
Expand All @@ -413,7 +413,7 @@ function M.effectOnUserRepairQuality(user,item)
improvementValue = improvementValue + parameter * QUALITY_BASE
end

isFired, parameter = M.effectUse(user,M.EFFEKT_AMULET_DIAMOND,CHARGES_ON_DIAMOND,PROBABILITY_ON_DIAMOND)
isFired, parameter = M.effectUse(user,M.EFFECT_AMULET_DIAMOND,CHARGES_ON_DIAMOND,PROBABILITY_ON_DIAMOND)
if isFired then
world:gfx(globalvar.gfxSCOTTY,user.pos)
local bestQuality = item:getData("qualityAtCreation")
Expand Down Expand Up @@ -443,7 +443,7 @@ function M.effectOnNpcRepair(user)
local PROB_FACTOR = 0.24
local preventionProb

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_RING_OBSIDIAN)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_RING_OBSIDIAN)
if user:increaseAttrib("hitpoints", 0) > HITPOINT_LIMIT then
if isFired then
world:gfx(globalvar.gfxSPRINKLE,user.pos)
Expand All @@ -466,7 +466,7 @@ function M.effectDamageIncrease(user,defender)
local parameter
local damageIncrease

isFired,parameter = M.effectUse(user,M.EFFEKT_RING_TOPAZ)
isFired,parameter = M.effectUse(user,M.EFFECT_RING_TOPAZ)
if isFired then
world:gfx(globalvar.gfxFLAMESTRIKE,defender.pos)
damageIncrease = 1 + parameter * DAMAGE_INCREASE_FACTOR
Expand All @@ -481,7 +481,7 @@ function M.effectRevertDamage(user,attacker)
local parameter
local damagePortion

isFired,parameter = M.effectUse(user,M.EFFEKT_AMULET_TOPAZ)
isFired,parameter = M.effectUse(user,M.EFFECT_AMULET_TOPAZ)
if isFired then
if effectRepel(attacker) then
world:gfx(globalvar.gfxFIZZLE,attacker.pos)
Expand Down Expand Up @@ -534,8 +534,8 @@ local function applyDamageOverTime(user,damageTaker,damage,effectCarrier,textDe,
end

function M.effectDamageOverTime(attacker,defender,damage)
applyDamageOverTime(attacker,defender,damage,M.EFFEKT_RING_DIAMOND,standardTextRingDe,standardTextRingEn)
applyDamageOverTime(defender,attacker,damage,M.EFFEKT_AMULET_DIAMOND,standardTextAmuletDe,standardTextAmuletEn)
applyDamageOverTime(attacker,defender,damage,M.EFFECT_RING_DIAMOND,standardTextRingDe,standardTextRingEn)
applyDamageOverTime(defender,attacker,damage,M.EFFECT_AMULET_DIAMOND,standardTextAmuletDe,standardTextAmuletEn)
end

function M.effectOnQuality(user)
Expand All @@ -546,7 +546,7 @@ function M.effectOnQuality(user)

local REQUIRED_CHARGES = 4
local QUALITY_FAKTOR = 0.7
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_RING_TOPAZ, REQUIRED_CHARGES)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_RING_TOPAZ, REQUIRED_CHARGES)
if isFired then
world:gfx(globalvar.gfxSCOTTY,user.pos)
if not isDestroyed then
Expand All @@ -559,7 +559,7 @@ function M.effectOnQuality(user)
local workbenchPos = common.GetFrontPosition(user)
local playerInSight = world:getPlayersInRangeOf(workbenchPos,1)
if #playerInSight > NUMBER_OF_HELPER then
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_RING_RUBY, REQUIRED_CHARGES)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_RING_RUBY, REQUIRED_CHARGES)
if isFired then
if not isDestroyed then
common.InformNLS(user,"Mit einer Person neben dir arbeitest du konzentrierter. Die Qualität deiner Arbeit wird besser.",
Expand Down Expand Up @@ -587,7 +587,7 @@ function M.effectBloodToQuality(user)
local qualityImprovement

if user:increaseAttrib("hitpoints", 0) > HP_LIMIT then
isFired,parameter = M.effectUse(user,M.EFFEKT_AMULET_OBSIDIAN, REQUIRED_CHARGES)
isFired,parameter = M.effectUse(user,M.EFFECT_AMULET_OBSIDIAN, REQUIRED_CHARGES)
if isFired then
world:gfx(globalvar.gfxBLOOD,user.pos)
user:increaseAttrib("hitpoints", - HP_COSTS)
Expand All @@ -610,7 +610,7 @@ function M.effectToolSelfRepair(user, toolItem, originalDurability)
local improvement
local targetDurability

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_RING_EMERALD)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_RING_EMERALD)
if isFired then
currentDurability = common.getItemDurability(toolItem)
improvement = math.max(MIN_IMPROVEMENT, (originalDurability - currentDurability) * parameter * DURABILITY_IMPROVEMENT_FACTOR)
Expand All @@ -632,7 +632,7 @@ function M.effectPreventMonsterOnGathering(user)
local isDestroyed
local preventionProbability

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_AMULET_EMERALD,1,EFFECT_PROBABILITY)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_AMULET_EMERALD,1,EFFECT_PROBABILITY)
if isFired then
preventionProbability = parameter * PREVENTION_BASE_VALUE
if math.random() < preventionProbability then
Expand All @@ -659,7 +659,7 @@ function M.effectSaveMaterialOnProduction(user)
local isDestroyed
local saveProbability

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_RING_SAPPIRE,1,EFFECT_PROBABILITY)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_RING_SAPPHIRE,1,EFFECT_PROBABILITY)
if isFired then
saveProbability = SAVE_BASE_SUMAND + parameter * SAVE_BASE_FACTOR
if math.random() < saveProbability then
Expand All @@ -686,7 +686,7 @@ function M.effectSaveMaterialOnRepair(user)
local isDestroyed
local saveProbability

isFired,parameter,isDestroyed = M.effectUse(user,M.EFFEKT_AMULET_SAPPIRE,1,EFFECT_PROBABILITY)
isFired,parameter,isDestroyed = M.effectUse(user,M.EFFECT_AMULET_SAPPHIRE,1,EFFECT_PROBABILITY)
if isFired then
saveProbability = SAVE_BASE_SUMAND + parameter * SAVE_BASE_FACTOR
if math.random() < saveProbability then
Expand Down
2 changes: 1 addition & 1 deletion magic/glyphmagic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ local glyphRitualBreakManaPortion = 0.5
local orderOfGem = {
{"Amethyst","Amethyst"},
{"Rubin","Ruby"},
{"Saphir","Sappire"},
{"Saphir","Sapphire"},
{"Obsidian","Obsidian"},
{"Smaragd","Emerald"},
{"Topas","Topaz"},
Expand Down

0 comments on commit 986c2aa

Please sign in to comment.