Skip to content

Instantly share code, notes, and snippets.

@duykhoa
Last active August 29, 2015 14:19
Show Gist options
  • Save duykhoa/8f79af8e9f57af27b802 to your computer and use it in GitHub Desktop.
Save duykhoa/8f79af8e9f57af27b802 to your computer and use it in GitHub Desktop.
class Traxex < Hero::RangedAgilityHero
# many things above
# ....
def normal_attack
arrow_shoot(base_damage)
end
def frost_arrows_attack
@is_iced_stun_affected = true
arrow_shoot(base_damage + frost_arrows_rates * base_damage)
stun_for(stun_rate)
end
def normal_attack_with_marksman_ship
speed_attack(marksman_ship_rate)
damage = marksman_ship_rate + base_damage * anpha_rate/level
arrow_shoot(damage)
end
# many method below
# A hero can buy support items, so need to write a ton of methods for each type of attack
# LOL
# __ _____ __
# /\ \ /\ __`\/\ \
# \ \ \ \ \ \/\ \ \ \
# \ \ \ __\ \ \ \ \ \ \ __
# \ \ \L\ \\ \ \_\ \ \ \L\ \
# \ \____/ \ \_____\ \____/
# \/___/ \/_____/\/___/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment