File size: 2,114 Bytes
b6a38d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- ========== GENERATED BY CharacterEffectCompositeDef Editor DO NOT EDIT MANUALLY! ==========

UndefineClass('Blinded')
DefineClass.Blinded = {
	__parents = { "CharacterEffect" },
	__generated_by_class = "CharacterEffectCompositeDef",


	object_class = "CharacterEffect",
	unit_reactions = {
		PlaceObj('UnitReaction', {
			Event = "OnBeginTurn",
			Handler = function (self, target)
				if not target:IsDead() then
					EnvEffectTearGasTick(target, nil, "start turn")
					if target:IsMerc() then
						PlayVoiceResponse(target, "GasAreaSelection")
					else
						PlayVoiceResponse(target, "AIGasAreaSelection")
					end
				end
			end,
		}),
		PlaceObj('UnitReaction', {
			Event = "OnEndTurn",
			Handler = function (self, target)
				if not target:IsDead() then
					EnvEffectTearGasTick(target, nil, "end turn")
				end
			end,
		}),
		PlaceObj('UnitReaction', {
			Event = "OnCalcChanceToHit",
			Handler = function (self, target, attacker, action, attack_target, weapon1, weapon2, data)
				if target == attacker then
					ApplyCthModifier_Add(self, data, self:ResolveValue("cth_effect"))
				end
			end,
		}),
		PlaceObj('UnitReaction', {
			Event = "OnCheckForceMinSight",
			Handler = function (self, target, observer, other, step_pos, darkness)
				if target == observer then
					return true
				end
			end,
		}),
	},
	DisplayName = T(629298563884, --[[CharacterEffectCompositeDef Blinded DisplayName]] "Blinded"),
	Description = T(595664130748, --[[CharacterEffectCompositeDef Blinded Description]] "Reduced <em>Sight range</em> and <em>Accuracy</em>. Can cause <em>Panic</em>."),
	AddEffectText = T(880622931884, --[[CharacterEffectCompositeDef Blinded AddEffectText]] "<em><DisplayName></em> is blinded"),
	OnAdded = function (self, obj)
		self:SetParameter("blinded_start_time", GameTime())
		if IsMerc(obj) then
			PlayVoiceResponse(obj, "GasAreaSelection")
		else
			PlayVoiceResponse(obj, "AIGasAreaSelection")
		end
	end,
	type = "Debuff",
	Icon = "UI/Hud/Status effects/blinded",
	RemoveOnSatViewTravel = true,
	RemoveOnCampaignTimeAdvance = true,
	Shown = true,
	HasFloatingText = true,
}