parent
417ddb8bac
commit
4c84db1504
|
@ -40,7 +40,8 @@
|
||||||
(lambda (total roll)
|
(lambda (total roll)
|
||||||
(if (> roll 20)
|
(if (> roll 20)
|
||||||
total
|
total
|
||||||
(adder (+ total (apply roll-dmg roll args)) (+ roll 1)))))
|
(adder (+ total (apply roll-dmg roll args))
|
||||||
|
(+ roll 1)))))
|
||||||
(/ (adder 0 1) 20)))
|
(/ (adder 0 1) 20)))
|
||||||
|
|
||||||
; find the best power attack score (and expected damage) versus an AC
|
; find the best power attack score (and expected damage) versus an AC
|
||||||
|
|
|
@ -24,13 +24,14 @@ class LispTabber(tab2.StackTabber):
|
||||||
if rtoken is not None and rtoken.string != '(':
|
if rtoken is not None and rtoken.string != '(':
|
||||||
rtoken = self.get_next_right_token(y, i + 1)
|
rtoken = self.get_next_right_token(y, i + 1)
|
||||||
if rtoken is None:
|
if rtoken is None:
|
||||||
level = self.get_curr_level() + 4
|
level = self.get_curr_level() + self.mode.tabwidth
|
||||||
else:
|
else:
|
||||||
level = rtoken.x
|
level = rtoken.x
|
||||||
self._append(token.string, level)
|
self._append(token.string, level)
|
||||||
return currlvl
|
return currlvl
|
||||||
|
|
||||||
class Lisp(mode2.Fundamental):
|
class Lisp(mode2.Fundamental):
|
||||||
|
tabwidth = 2
|
||||||
tabbercls = LispTabber
|
tabbercls = LispTabber
|
||||||
grammar = LispGrammar
|
grammar = LispGrammar
|
||||||
opentokens = ('delimiter',)
|
opentokens = ('delimiter',)
|
||||||
|
|
|
@ -26,6 +26,7 @@ class SchemeGrammar(Grammar):
|
||||||
]
|
]
|
||||||
|
|
||||||
class Scheme(mode2.Fundamental):
|
class Scheme(mode2.Fundamental):
|
||||||
|
tabwidth = 2
|
||||||
tabbercls = mode.lisp.LispTabber
|
tabbercls = mode.lisp.LispTabber
|
||||||
grammar = SchemeGrammar
|
grammar = SchemeGrammar
|
||||||
opentokens = ('delimiter',)
|
opentokens = ('delimiter',)
|
||||||
|
|
3
tab2.py
3
tab2.py
|
@ -154,7 +154,8 @@ class StackTabber(Tabber):
|
||||||
token = self.get_token(y, i)
|
token = self.get_token(y, i)
|
||||||
rtoken = self.get_next_right_token(y, i)
|
rtoken = self.get_next_right_token(y, i)
|
||||||
if rtoken is None:
|
if rtoken is None:
|
||||||
level = self.get_curr_level() + 4
|
#level = self.get_curr_level() + 4
|
||||||
|
level = self.get_curr_level() + self.mode.tabwidth
|
||||||
else:
|
else:
|
||||||
level = rtoken.x
|
level = rtoken.x
|
||||||
self._append(token.string, level)
|
self._append(token.string, level)
|
||||||
|
|
Loading…
Reference in New Issue