Skip to content

Instantly share code, notes, and snippets.

Prime_Punchmech.PathSize = INT_MAX
Prime_Punchmech.Damage = 1
-- statemachine for the conga
local Tracked = {}
local ST_ACTIVE = 0 -- in the conga
local ST_DROPPED = 1 -- fell into a hole
local ST_PUSHED = 2 -- run into an immovable obstacle, acts as an immovable obstacle itself now
local ST_PAUSED = 3 -- temporarily paused until the conga catches up

?:

  • GetBoard
  • GetGame
  • GetScripts

ValueBar:

  • AddEvent
  • GetMax
  • GetValue
function SerializePawn(pawn)
-- Used in scripts
-- GetType(), GetId(), IsFrozen(), SetFrozen(bool), IsFire(), SetFire(bool),
-- SetPowered(bool), IsActive(), SetActive(bool), SetNeutral(bool),
-- SetCustomAnim(string), FlyAway(), Move(Point),
-- Retreat(), SetPriorityTarget(Point), GetTarget(), FireWeapon(Point (offset), 1),
-- SetMoveSpeed(int), GetMoveSpeed(), SetMech(), IsBusy(), IsUndoPossible()
-- IsWeaponArmed(), GetArmedWeaponId(), IsSelected(), SetHealth(int),
-- GetHealth() SetMissionCritical(bool), SetAcid(bool), IsAcid(),
-- SpawnAnimation(), GetSpace(), SetSpace(Point)
@Tarmean
Tarmean / Lib.hs
Last active February 21, 2018 16:15
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
module Lib (longestCommonSubstring) where
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Internal.Fusion.Common as S
import qualified Data.Text.Internal.Fusion as S
import qualified Data.List as L
import qualified Data.Text.Unsafe as U
let {
$wbuildTable_s5dj
$wbuildTable_s5dj
= \ ww2_s5d6 ww3_s5da ww4_s5de ->
join {
exit_XS
exit_XS ww5_s5cU ww6_s5cY
= (# or# ww5_s5cU (uncheckedShiftL# 1## (andI# (word2Int# r#_a4by) 63#)), ww6_s5cY #) } in
joinrec {
$wbuildTable1_s5d0
@Tarmean
Tarmean / .gas
Last active January 29, 2018 11:16
==================== Asm code ====================
.section .data
.align 8
.align 1
.globl $wackermann_closure
$wackermann_closure:
.quad $wackermann_info
diff --git c/src/com/megacrit/cardcrawl/actions/unique/NightTerrorAction.java w/src/com/megacrit/cardcrawl/actions/unique/NightTerrorAction.java
index bb05c1d..d5d6704 100644
--- c/src/com/megacrit/cardcrawl/actions/unique/NightTerrorAction.java
+++ w/src/com/megacrit/cardcrawl/actions/unique/NightTerrorAction.java
@@ -42,7 +42,7 @@ extends AbstractGameAction {
return;
}
if (this.p.hand.size() == 1) {
- AbstractDungeon.actionManager.addToTop(new ApplyPowerAction(this.p, this.p, new NightTerrorPower(this.p, this.amount, this.p.hand.getBottomCard())));
+ this.setupPower(this.p.hand.getBottomCard());
{-# Language OverloadedStrings #-}
import qualified Data.Set as S
import qualified Data.Map as M
import Data.List (sort, foldl', find)
import Data.Function(on)
import Control.Applicative (liftA2)
import Data.Monoid ((<>))
import Control.Arrow ((&&&))
read-input = READ_BYTE
print-byte = PRINT_BYTE
Z = λf.(λx.(x x) λx.(f λy.((x x) y)))
fix = Z
make-pair = λa.λb.λf.(f a b)
fst = λp.(p (λx.λy.x))
snd = λp.(p (λx.λy.y))
@Tarmean
Tarmean / tree-style-tabs.css
Last active January 5, 2018 20:52
Firefox tree-style-tabs config
@media (max-width: 120px) {
#tabbar {
margin-top: 5px !important;
overflow-x: hidden;
}
:root {
background: var(--tab-surface) !important;
}
/* the changes between.tab and .tab.faviconized differ between themes. doing this twice seems the most consistent */
.tab {