parent
2b089cb516
commit
6a216d9b3e
@ -0,0 +1,60 @@ |
|||||||
|
{{BWCharacterSheet |
||||||
|
|name=<%= name %> |
||||||
|
|stock=<%= stock.capitalize %> |
||||||
|
|age=<%= age %> |
||||||
|
|homeland= |
||||||
|
|features= |
||||||
|
|
||||||
|
<% lifepaths.each.with_index do |lifepath, i| %> |
||||||
|
|lifepath<%= i+1 %>=<%= lifepath %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
|fate= |
||||||
|
|persona= |
||||||
|
|deeds= |
||||||
|
|
||||||
|
|belief1= |
||||||
|
|belief2= |
||||||
|
|belief3= |
||||||
|
<%# |belief_special= %> |
||||||
|
|
||||||
|
|instinct1= |
||||||
|
|instinct2= |
||||||
|
|instinct3= |
||||||
|
|
||||||
|
|character_traits={{BWCharacterSheet/TraitList |
||||||
|
<% for trait in traits.filter { |trait| trait[1] == "character" }%> |
||||||
|
|<%= trait[0] %> |
||||||
|
<% end %> |
||||||
|
}} |
||||||
|
|
||||||
|
|die_traits={{BWCharacterSheet/TraitList |
||||||
|
<% for trait in traits.filter { |trait| trait[1] == "die" }%> |
||||||
|
|<%= trait[0] %> |
||||||
|
<% end %> |
||||||
|
}} |
||||||
|
|
||||||
|
|call-on_traits={{BWCharacterSheet/TraitList |
||||||
|
<% for trait in traits.filter { |trait| trait[1] == "call_on" }%> |
||||||
|
|<%= trait[0] %> |
||||||
|
<% end %> |
||||||
|
}} |
||||||
|
|
||||||
|
|will=<%= stats["will"][0] %><%= stats["will"][1] %>,0,0,0,0,0 |
||||||
|
|perception=<%= stats["perception"][0] %><%= stats["perception"][1] %>,0,0,0,0,0 |
||||||
|
|power=<%= stats["power"][0] %><%= stats["power"][1] %>,0,0,0,0,0 |
||||||
|
|forte=<%= stats["forte"][0] %><%= stats["forte"][1] %>,0,0,0,0,0 |
||||||
|
|agility=<%= stats["agility"][0] %><%= stats["agility"][1] %>,0,0,0,0,0 |
||||||
|
|speed=<%= stats["speed"][0] %><%= stats["speed"][1] %>,0,0,0,0,0 |
||||||
|
|
||||||
|
|health=<%= attributes["health"][0] %><%= attributes["health"][1] %>,0,0,0,0,0,0 |
||||||
|
|steel=<%= attributes["steel"][0] %><%= attributes["steel"][1] %>,0,0,0,0,0,0 |
||||||
|
|circles=<%= attributes["circles"][0] %><%= attributes["circles"][1] %>,0,0,0,0,0,0 |
||||||
|
|resources=<%= attributes["resources"][0] %><%= attributes["resources"][1] %>,0,0,0,0,0,0 |
||||||
|
<%# |special_att1=Faith,B3,6,5,4,3,2,1 %> |
||||||
|
<%# |special_att2=Grief,B3,6,5,4,3,2,1 %> |
||||||
|
|
||||||
|
<% skills.each.with_index do |skill,i| %> |
||||||
|
|skill<%= i+1 %>=<%= skill[0] %>,<%= skill[1] %><%= skill[2] %>,0,0,0,0,0,0 |
||||||
|
<% end %> |
||||||
|
}} |
@ -0,0 +1,22 @@ |
|||||||
|
require 'erb' |
||||||
|
|
||||||
|
class WikiSheet |
||||||
|
include ERB::Util |
||||||
|
attr_accessor :character |
||||||
|
|
||||||
|
def initialize(character) |
||||||
|
@character = character |
||||||
|
end |
||||||
|
|
||||||
|
def render() |
||||||
|
load_template |
||||||
|
ERB.new(@template, 0, '>').result_with_hash(@character) |
||||||
|
end |
||||||
|
|
||||||
|
private |
||||||
|
|
||||||
|
def load_template |
||||||
|
@template = File.read("data/WikiSheet.erb") |
||||||
|
end |
||||||
|
|
||||||
|
end |
Loading…
Reference in new issue