mr:chaos_shield_left_buff
Table of Contents
Chaos Shield Left Buff - Code References
Lua Scripts
- ChaosShieldLeft.lua - Implements the left half of the Chaos Shield with chaotic effects
- ChaosShield.lua - Creates the Chaos Shield and applies the ChaosShieldLeft buff
- shields.lua (Shield library with shared functionality)
String Resources
<string name="ShieldBuffReady_Name">Shield</string> <string name="ShieldBuffNotReady_Name">Shield (Not Ready)</string> <string name="ShieldBuffReady_Info">Your shield is ready to block the next attack.</string> <string name="ShieldBuffNotReady_Info">Your shield is not ready yet. Wait for it to recharge.</string>
These strings are referenced in the Lua script but are defined in the main game resources:
- English: strings_all.xml
- Russian: values-ru/strings_all.xml
- And other language files as appropriate
Related Files
- Lua library: buff.lua
- Shield recharge mechanics: shields.lua
- Related to Chaos Shield item: ChaosCrystal.java
- Common classes library: commonClasses.lua
Key Properties from Code
Buff Name in Code: “ChaosShieldLeft” (as used in ChaosShield.lua)
Chaotic Effects on Block: When the Chaos Shield successfully blocks an attack, one of six random effects occurs:
- Heal Bearer: Heals the shield bearer for the blocked damage amount (10% chance to double heal)
- Damage Enemy: Damages the attacker for the blocked damage amount (10% chance to double damage)
- Clone Enemy: Creates a clone of the enemy in an adjacent cell
- Buff Bearer: Applies a random beneficial buff (ManaShield, DieHard, BodyArmor, Blessed, Barkskin, Fury, Speed)
- Curse Enemy: Applies a random debuff (Poison, Ooze, Charm, Slow, Sleep, Roots, Amok, Bleeding, Necrotism, Terror, Paralysis, Cripple, Stun)
- Turn to Sheep: Transforms the enemy into a Sheep for 3-5 turns (bosses immune)
Shield Mechanics:
- Two states: “ready” (icon 47) and “not ready” (icon 48)
- Block chance based on shield level and hero STR
- Damage reduction based on shield level and item level
- Recharge time and wait-after-block time calculated by shields.lua library
Code References
- ChaosShieldLeft.lua - Main buff implementation
- ChaosShield.lua - Item that applies this buff
- ChaosCrystal.java - Chaos set collection logic
- strings_all.xml - Chaos Shield string resources
- Sprite: `items/chaosShield.png`
mr/chaos_shield_left_buff.txt · Last modified: by 127.0.0.1
