Class: Adam::Kill::InvolvedParty

Inherits:
Object
  • Object
show all
Defined in:
lib/adam/kill.rb

Overview

Instances of the InvolvedParty class represent an involved party in a kill.

Accessors:

  • type - A symbol describing whether the pilot was player-controlled (:PC) or non-player controlled (:NPC).

  • pilot - A string describing the name of the pilot. For NPCs, this is nil.

  • security_status - A floating-point number describing the security status of the pilot. For NPCs, this is nil.

  • corporation - A string describing the name of the corporation the pilot is enrolled in. For NPCs, this may be nil.

  • alliance - A string describing the name of the alliance the corporation is a member of. May be nil if the corporation is not in an alliance.

  • faction - A string describing the name of the faction the pilot is involved in. May be nil if the pilot is not in a faction.

  • ship - A string describing the name of the ship that the pilot was flying.

  • weapon - A string describing the name of the weapon that was last fired by this pilot.

  • damage_done - An integer describing damage done by this pilot.

  • final_blow - A boolean describing whether or not this pilot made the final blow.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ InvolvedParty

Returns a new instance of InvolvedParty.

Yields:

  • (_self)

Yield Parameters:



170
171
172
# File 'lib/adam/kill.rb', line 170

def initialize
  yield self if block_given?
end

Instance Attribute Details

#allianceObject

Returns the value of attribute alliance.



160
161
162
# File 'lib/adam/kill.rb', line 160

def alliance
  @alliance
end

#corporationObject

Returns the value of attribute corporation.



160
161
162
# File 'lib/adam/kill.rb', line 160

def corporation
  @corporation
end

#damage_doneObject

Returns the value of attribute damage_done.



160
161
162
# File 'lib/adam/kill.rb', line 160

def damage_done
  @damage_done
end

#factionObject

Returns the value of attribute faction.



160
161
162
# File 'lib/adam/kill.rb', line 160

def faction
  @faction
end

#final_blowObject

Returns the value of attribute final_blow.



160
161
162
# File 'lib/adam/kill.rb', line 160

def final_blow
  @final_blow
end

#pilotObject

Returns the value of attribute pilot.



160
161
162
# File 'lib/adam/kill.rb', line 160

def pilot
  @pilot
end

#security_statusObject

Returns the value of attribute security_status.



160
161
162
# File 'lib/adam/kill.rb', line 160

def security_status
  @security_status
end

#shipObject

Returns the value of attribute ship.



160
161
162
# File 'lib/adam/kill.rb', line 160

def ship
  @ship
end

#typeObject

Returns the value of attribute type.



160
161
162
# File 'lib/adam/kill.rb', line 160

def type
  @type
end

#weaponObject

Returns the value of attribute weapon.



160
161
162
# File 'lib/adam/kill.rb', line 160

def weapon
  @weapon
end

Instance Method Details

#npc?Boolean

Returns:

  • (Boolean)


166
167
168
# File 'lib/adam/kill.rb', line 166

def npc?
  type == :NPC
end

#pc?Boolean

Returns:

  • (Boolean)


162
163
164
# File 'lib/adam/kill.rb', line 162

def pc?
  type == :PC
end