Add a basic port of the Ruby combat framework

This commit is contained in:
Gary Tierney
2017-12-31 07:28:41 +00:00
parent 106fbfb8f9
commit d392913356
30 changed files with 976 additions and 117 deletions
@@ -0,0 +1,65 @@
Scimitar("Iron Scimitar") {
attackBonuses {
stab = 2
slash = 10
}
meleeStrength = 9
}
Scimitar("Steel Scimitar") {
attackBonuses {
stab = 3
slash = 15
}
meleeStrength = 14
}
// @todo - regexp support
//Scimitar("/(black|white) Scimitar/") {
// attackBonuses {
// stab = 4
// slash = 19
// }
//
// meleeStrength = 14
//}
Scimitar("Mithril Scimitar") {
attackBonuses {
stab = 5
slash = 21
}
meleeStrength = 20
}
Scimitar("Adamant Scimitar") {
attackBonuses {
stab = 6
slash = 29
}
meleeStrength = 28
}
Scimitar("Rune Scimitar") {
attackBonuses {
stab = 7
slash = 45
}
meleeStrength = 44
}
Scimitar("Dragon Scimitar") {
attackBonuses {
stab = 8
slash = 67
}
meleeStrength = 66
}
@@ -0,0 +1,21 @@
import AttackStyle.*
import org.apollo.game.model.Animation
object Scimitar : MeleeWeaponClass({
widgetId = 2423
defaults {
attackSpeed = 4
attackAnimation = Animation(390)
attackType = AttackType.Slash
}
Accurate { button = 2 }
Aggressive { button = 3 }
AltAggressive {
button = 4
attackType = AttackType.Stab
attackAnimation = Animation(391)
}
Defensive { button = 5 }
})
@@ -0,0 +1,3 @@
Bow("Shortbow") {
}
@@ -0,0 +1,28 @@
import AttackStyle.*
import AttackType.Ranged
import org.apollo.game.model.Animation
object Bow : RangedWeaponClass(Arrows, {
widgetId = 1764
defaults {
attackType = Ranged
attackAnimation = Animation(426)
attackSpeed = 4
attackRange = 7
}
Accurate {
button = 1772
}
Rapid {
button = 1770
attackSpeed = 3
}
LongRanged {
button = 1771
}
})