This repository has been archived by the owner on Dec 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional Sizes and simple way to load Hero with custom size and name
- Loading branch information
Showing
7 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
require_relative "sizes/size" | ||
require_relative "sizes/small" | ||
require_relative "sizes/normal" | ||
require_relative "sizes/large" | ||
|
||
module EternalSoulAsylum | ||
module Mechanics | ||
module Sizes | ||
def self.by_name(name) | ||
case name | ||
when :small then Small.new | ||
when :normal then Normal.new | ||
when :large then Large.new | ||
else | ||
Normal.new | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module EternalSoulAsylum | ||
module Mechanics | ||
module Sizes | ||
class Large < Size | ||
def initialize(damage_modifier = 1.5) | ||
@damage_modifier = damage_modifier | ||
super | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module EternalSoulAsylum | ||
module Mechanics | ||
module Sizes | ||
class Small < Size | ||
def initialize(damage_modifier = 0.5) | ||
@damage_modifier = damage_modifier | ||
super | ||
end | ||
end | ||
end | ||
end | ||
end |