#wip: piecewise
Explore tagged Tumblr posts
littjara-mirrorlake · 1 year ago
Text
2.0(?) update: Thinking of making the saves equal to the necrotic damage taken, instead of half of it--it scales better when creatures start dealing more damage at higher levels.
Plane Shift: New Phyrexia Phyresis Rules 1.0
Contact with Phyrexian creatures and glistening oil can lead to phyresis, a special condition tracked in ten stages. Phyresis is not a disease, so immunity to disease cannot prevent a creature from being afflicted. Phyrexian creatures are immune to this condition.
A creature infected by phyresis experiences the effects of its current level and all those below.
Until level 5, greater restoration may remove a phyresis level from a targeted creature in addition to its other effects.
Every 24 hours, a character who has at least 1 phyresis level must roll a d20. On a roll equal to or less than their current phyresis level, they gain one level.
Phyresis Level Effects
1: No effect 2: No effect 3: Disadvantage on saving throws against being charmed or frightened by Phyrexian creatures 4: No new effect 5: Phyresis can no longer be removed by greater restoration 6: No new effect 7: Phyrexian language proficiency 8: Gain one augmentation for which you meet the prerequisites (detailed in a later installment) 9: No new effect 10: Incapacitated; begin compleation saving throws (see “A Sublime Transformation”) (Below the cut)
A Sublime Transformation
Most compleated adult Phyrexians, including player characters, are capable of compleating other creatures with sufficient ichor and time. A compleated creature retains its original type and racial features but gains the Phyrexian supertype. As a general rule, spells cast using Phyrexian mana that raise a target from the dead will return them compleated, if they were not already.
Much like being raised from the dead, the process of compleation is an exhausting ordeal that saps the energy of affected creatures. A newly compleated Phyrexian takes a -3 penalty to all attack rolls, saving throws, and ability checks. Each time the creature finishes a long rest, the penalty is reduced by 1 until it disappears.
Often, compleation is a process of optimization, reinforcing a creature's existing strengths. In that spirit, compleated player characters may increase one ability score above 20 by subtracting 2 from another ability score for each increase by 1 to the target score, to a maximum of 22. In addition, the compleated character gains one Phyrexian augmentation for which they meet the prerequisite.
Compleation is a unique opportunity for a player to re-work their character, extending to even class and subclass choices. Additionally, the mnemonic nature of glistening oil means that genetic material is not the only thing passed down from a Phyrexian to a creature they compleat. A newly compleated creature gains one skill proficiency possessed by the Phyrexian who compleated them.
Glistening oil carries the voice of Yawgmoth, who seeks to bend all to his whims. When you reach 10 phyresis levels, you must make a DC 16 Wisdom or Charisma saving throw each turn (your choice). The Phyrexian compleating you may grant you advantage on these saving throws. Successes and failures don't need to be consecutive; keep track of both until you collect three of a kind. When you roll a 1 on the d20, it counts as two failures; likewise, a 20 on the d20 counts as two successes. On your third success, you become compleated while retaining your previous memories and convictions. On your third failure, your bonds are altered to serve Phyrexia. You retain your base alignment and personality, but may suffer memory loss. Either way, you lose all phyresis levels and their effects.
Though powerful, the alteration of loyalties during compleation can be undone. Dispel magic or remove curse cast with a 7th-level slot or higher can restore one target creature to its former bonds if its mind had been altered in this way. You can target one additional creature for each slot level above 7th.
312 notes · View notes
biletdoux · 4 years ago
Text
WIP FOLDER TAG
tagged by @odentist! tysm, ilysm, i mean it <333
RULES: post the names of all the files in your wip folder, regardless of how non-descriptive or ridiculous. then people can send asks with the title that most intrigues/interests them and you’ll post a little snippet of it or tell them something about it!
1. paint me the sea ; yuta nakamoto (addictions collab)
psychological horror! maybe, sorta, kinda. at least my attempt at it. will be one of the darkest fics i ever write because i have a weak heart and want good things only. basically yuta and a japanese reader keeps crossing paths and a relationship blooms, but reader has some issues and yuta has an interesting ‘addiction’ of sorts. release date is 02/01/2021!
2. did it hurt? ; mark lee (candy hearts collab)
fluff! high school shenanigans with the reader and dreamies + maybe more. new kid mark transfers to their high school and fits right in and when reader sees him, it’s love at first sight. or something like that. release date is 02/14/2021 <3
3. [untitled] ; lucas wong (pretty colours collab)
slice of life! maybe. maybe no fic at all. it will be an companion piece of the mood board for the ‘pretty colours collab’ based around the prompt “hands.” it will only be written if i have the time for it, february is kinda busy for me://. it’ll probably be a short pianist!lucas piece. release date is 02/20/2021
4. a house of cards (and us inside) ; dong sicheng (the arcana: love readings collab)
angst! maybe my heaviest fic yet, deals with explicit drug and alcohol abuse. engineering student sicheng meets drug dealer reader to get some adderall to help him study for a huge exam. they keep running to each other more and more and slowly, but surely he gets addicted while reader starts to realize she wants more out of her life than quick highs and cheap liquor. release date is 02/28/2021
5. but we hold on ; jung jaehyun
angst! the failing relationship between soloist jaehyun and his back up dancer reader and how they got to this point and what they’ll do from here. (jaehyun’s a real piece of shit in this one haha)
6. always have (always will) ; na jaemin
angst! vampire knight!au with jaemin as hanabusa aidou haha. level b noble vampire jaemin falls in love with level d vampire reader who is slowly succumbing to level e
7. what’s left of us ; lee donghyuck
slice of life! badminton!au. kinda really excited for this one. lee donghyuck, young and cocky up and coming star of the korean national badminton gets suspended from competition after failing a random drug test after a wild night of partying. he gets whisked to his grandparents hometown in an attempt to self-reflect and there he meets the young coach reader at the local badminton club. maybe a hesitant friendship blooms between them and the reader helps him see beyond himself.
8. from a to be ; kim doyoung
slice of life! college!au. nct member subject to change, but for now it’s doyoung. physics major doyoung gets roped into going to a secluded ice rink on the outskirts of town where he meets figure skater reader who trains everyday in hopes of a future in a competive world, but are they training for themseleves or training to meet the expectations of the people around them? maybe doyoung can help them with figuring that out.
9. tired eyes ; mark lee
slice of life! after mark suffers a public and severe mental breakdown from overworking, his parents decide the best course of action is to enroll him in a brief therapy program, where he’ll have to board there for the next 90 days. mark isn’t happy to say the least, but along the way, he meets another lost soul who happens to be the reader.
10. [untitled] ; lucas wong
fluff! lucas is the star port of his university’s crew team. he’s loved and adored by all, except for the reader, but they still have to put up with him, because unfortunately, the reader is the coxswain of his boat.
11. [untitled] ; moon taeil or qian kun
mystery! this one is hard, because my brain is small, but it’s an idea that’s been brewing for awhile. member is still up for debate. rookie insurance investigator reader lands the jobs at the highest rated insurance investigation company and the reader is paired with senior investigator kun or taeil. their first case together is a series of fires that keeps popping up.
12. piecewise functions ; park jisung
fluff! high school!au. jisung is the new kid at school and he’s doing his best to find out where he belongs, stumbling on mishaps here and there, in the process.
13. refined tastes ; lee taeyong
angst! least thought out of any wips. basically an idea at most. just a line has been written, no clear plot yet :///
-
tagging whoever wants to do it!
6 notes · View notes
mathdevelopment · 7 years ago
Text
Functional, Algebraic, and Interpreted language
Which is abbreviated to FAI (pronounced fī) or FAI lang.
Over the past while, I've been creating my own language, and while it's certainly not complete by any means, it's ready for a showcase and first draft specification.
Objective
Many people have said that we need to make CS more ingrained in math education, but people generally haven't provided any seamless solutions. Rather than integrating CS with math, these proposals tend to just teach CS and math side-by-side. That's better than nothing, but it's not good enough. To truly teach them together, you need a language that looks so much like algebra that students can use it intuitively without much thought. That's where FAI comes in. It strives to be a purely functional language with algebraic syntax. While it has features not commonly found in algebra (like string manipulation), the core principle is to provide a high-level language that looks and acts like algebra, just with a heavy emphasis on functions.
It can't solve equations for you. That's not the point. If you want something to solve equations for you, use a calculator. FAI allows you to implement your own derivations as functions, and call them as necessary. For example:
plus_minus(a, b) = (a+b | a-b) quadratic(a, b, c) = plus_minus(-b, sqrt((b^2)-(4*a*c)))/(2*a)
And then insert \(x^2-3x+2=0\)
quadratic(1, -3, 2) > (2 | 1)
And it returns the roots: 2 and 1. Don't worry about the syntax the roots were returned in for now, just know that both 2 and 1 were returned by the quadratic function.
FAI is also purely functional, making it great for teaching the functional programming concepts which are applicable in almost every high-level field. lambda exists in a readable format, and is used as any other function. In fact, all built-in functions are simply lambdas with external definitions that have been attached to a name:
quadratic > lambda(a, b, c: <expression>) sqrt > lambda(a: <external>)
This allows for usage of higher-order functions, like so:
combine_three(a, b, c, func)=func(func(a,b),c) combine_three(1, 2, 3, lambda(a, b: a + b)) > 6
This can also teach about recursion, using a piecewise-like syntax for the conditions:
factorial(x)={x<=1: 1; x * factorial(x-1)} factorial(5) > 120
There exist other more semantically relevant features, but not ones that get in the way of the core purpose of the language, which is to serve as a link between programming and algebra.
Features and WIP Specification
The following is a detailed list of current language features at the time of writing. If you aren't interested in this, scroll down a lot to find information on the future of this language.
Scope
Scope in FAI is slightly confusing, though it has been designed to keep the purely functional aspect of the language where a function may only use its own arguments.
Globals
The following are both global definitions, but they do very different things:
var_name = 10 func_name() = 10
The first is called an outer argument, while the second is a global function. The scope of an outer argument is restricted to the outermost scope, while the scope of a global function extends to everywhere. For example:
x = 10 f1(a) = a + 1 f1(x) // Using an outer argument in the outer scope works > 11 f2(a) = x + a // Oops! Can't use an outer argument inside a function f2(1) > InvalidName: The name x is neither a named function nor an argument. f3(a) = f1(a) + 1 // Using a global function in a function is okay though f3(10) > 12
This means that these two lines technically act differently:
f(x) = x+1 // Can be used anywhere l = lambda(x: x + 1) // Can only be used in the outer scope
Function
A function may only access its arguments and any globally defined function. All functions also have access to self, which is always defined to be the lambda of the function being called, except in the outer scope. While this would mostly be used for lambda recursion, technically any function has access to its self.
Calls
A call is anything directly evaluated by the REPL. However, because expressions have fairly intuitive evaluation, this part will be exclusively focused on non-expression calls.
Declaration
The syntax for declaring a global function is:
fname(arg1, arg2, arg3, ... argn) = <expression>
The syntax for declaring an outer argument is:
oname = <expression>
Memoization
Certain recursive functions can take a long time to execute. For example, the following call can take 5 seconds to execute:
fibo(x) = {x <= 2: 1; fibo(x-1) + fibo(x-2)} fibo(32) // This is REALLY slow > 2178309
However, it can be sped up through a trick called memoization. In many languages you would have to implement this yourself, but FAI will memoize functions for you if you add the keyword memo before the function definition.
memo fibo(x) = {x <= 2: 1; fibo(x-1) + fibo(x-2)} fibo(400) // Lightning fast. If it wasn't memoized, it would longer than the heat death of the universe to finish. > 1.76023680645014E+83
Update
Attempting to redefine a name in the outer scope will throw an error without the update keyword.
x = 10 f(x) = x + 1 f(x) > 11 x = 5 // Can't do this! > DefineFailed: The update keyword is required to change the definition of a function or outer argument. update f(x) = x + 2 // This is okay though. f(x) > 12
Because FAI is lazily evaluated, it can break memoization if a memoized function relied on a now updated function. To fix this, the update keyword may also be used in conjunction with memo to refresh the memoization of a function, or when used on a non-memoized function, it can change that function to be memoized:
g(x) = 1 memo f(x) = g(x) f(2) > 1 update g(x) = x f(2) // Oops! Memoization stored a value wrong! > 1 update memo f f(2) // There we go. > 2
Termination
Calls may be terminated with either an EOF or ;.
Types
All types support = and ~= as "equals" and "not equals," which both return booleans. The one exception is unions, which handle those operators in the same special form that they handle all other operators.
Numbers
FAI numbers are complex. The literal may contain a single optional decimal point as well as an i at the end for imaginary values. While they may be represented in a complex form like 4+2i, keep in mind that that form is really just an addition of 4 and 2i. +, -, *, /, and ^ operators are legal. - may also be used as a prefix (e.g. -10) to negate the value of a number. The comparison operators >, <, >=, and <= are unique to numbers, and unlike the other numerical operators, they return booleans. It should be noted that comparing the values of complex numbers with imaginary components is impossible in algebra, which is discussed in the challenges section of this post lower down.
Booleans
In FAI, booleans act as one might expect. They can be either true or false. + serves as the boolean "or" operator and * serves as the boolean "and" operator, with the ~ prefix being "not." Booleans are the only type for which all operators and prefixes used on it will return the same type.
Strings
FAI strings are currently barely working and should not be used. However, they do support + for concatenation, and use the "str" literal. You know what, don’t even try to use strings. They’re so broken in this version.
Lambdas
"Lambda" will often be used interchangeably with "function" in FAI, as any lambda is also a function and any function is also a lambda. Lambdas only support the call syntax, which is a special form postfix notation.
Unions
Unions really deserve their own category. The point of a union is to be multiple values in a single object. For example, the quadratic function should return up to two numbers, even though it can only return one thing. To solve this, it returns a union of both valid answers. This union may only be manipulated as if it were a single value. Unions may only contain distinct values, and if a union only has one distinct value, it dissolves into that one value. Unions also may not be nested, and any nested union will be automatically flattened upon evaluation. They are defined using the union literal (val1 | val2 | val3 | ... | valn).
Piecewise expressions
For if, else, and cond, FAI has piecewise expressions. The syntax is as such: {cond1: <expr1>; cond2: <expr2>; cond3: <expr3>; ...; condn: <exprn>; <exprelse>}
Lambda expressions
A lambda expression may also be known of as an anonymous function. It allows you to create a function as an object rather than as a definition, which can be extremely powerful in many different use cases. Other than piecewise expressions, the lambda expression probably has the most special form of any expression in the language: lambda(arg1, arg2, arg3, …, argn: <expression>)
Challenges and Future Goals
Challenges
Currently, large amounts of recursion will result in a stack overflow. I'll need to restructure the functional call stack to operate iteratively in the future.
Currently, non-real numbers are compared by using their magnitudes. However, this means that (5+2i) >= (5-2i) is true, and even worse, (5+2i) >= (-5+2i) is also true. A possible fix would be to throw an error when comparing non-real numbers, but I would rather not do that if possible.
The common algebraic syntax 2x and 2(x) are not legal. They should be. However, making them legal would require a moderate reworking of how expressions are parsed.
Algebra has a single-argument pipeline syntax called composition (e.g. \(f \circ g(x)\)) that should be added. However, finding a suitable replacement for ∘ may be tricky given that o can be used in names and * is used for multiplication. . may work.
Decisions
I'm currently debating over whether I should add vectors and matrices. I have a syntax figured out for them, but I'm not sure I want them to be part of the language.
What should happen if part of a union throws an error?
Should a null-like type be introduced? There are benefits from a language perspective, but it's not terribly algebraic.
A function should be able to take in a variable number of arguments, though a syntax and data structure to handle that is tricky to decide on.
Bugs and currently unimplemented features
Order of operations is not necessarily obeyed.
String indexing successfully parses, but has not yet been implemented.
The REPL only has support for one-line calls, despite multi-line calls being fully parseable.
Extraneous content at the end of an call will sometimes parse even though it's not legal code.
Complex math, especially regarding exponents and sqrt, may result in near-zero imaginary errors. These errors could cause major issues with comparison operators, and these forms are just generally less readable.
Lambda expressions should be memoizable.
= and ~= do not work with lambdas. They should.
Unions should not ever be directly transferred as arguments, even in user-defined functions. They should always be run separately and then reunified, like for external functions.
Strings are just completely broken right now and need to be fixed.
How to use the FAI REPL program
Download and unpack the FAI REPL.
Install the .NET Core 2 runtime.
Run dotnet FAIrepl.dll in the unpacked folder using whatever your system's command line is.
0 notes
jaggerwockyy · 2 years ago
Text
apparently i do not know how to stop starting wips. anyway. here's a snippet from piecewise, another entry into my system of equations series (also informally known as the unhelpful-obi-wan-series)
includes my headcanon where clones are used to having "spare parts" ... they're used to having limbs and even whole bodies replaced quite frequently
“Look at yourself,” Cody says, more to himself than Kenobi. For once he has a captive audience. “How dare you risk yourself like that. It wasn’t necessary, General. You’re too valuable for this.” He wants to add, you di’kut. You stupid, stupid Jedi.
--------------------------------------------------------------------------
Cody storms into the medbay, straight into the corner where Obi-Wan Kenobi’s lying in bacta, awake, but eyes shut in pain. There are lacerations all over his fair skin, dark stitches holding his body together. He’s not even in the vertical tank, but one of the precious coffin-shaped horizontal ones that take up more space than they have. Apparently, the general could barely even sit, much less be suspended in a tank.
Cody steps closer and places a gauntlet against the glass. He sweeps Kenobi from head to toe. A smattering of blaster wounds cross his body, one of them through-and-through his torso, too close to his heart for Cody’s comfort. Cody shudders, ice climbing down his spine. He can’t get the sound of Obi-Wan’s gasp out of his mind.
“Look at yourself,” Cody says, more to himself than Kenobi. For once he has a captive audience. “How dare you risk yourself like that. It wasn’t necessary, General. You’re too valuable for this.” He wants to add, you di’kut. You stupid, stupid Jedi.
It will be ages before the nearest Jedi healer gets here, Cody thinks. If Kenobi had done what he was supposed to, they’d be up and running already. Cody’d have a new body, yes, but he’s trained for that, and he even has the option of another body. Kenobi didn’t have any excuses. He had the Extractor with him, he always has it with him. The Extractor---the machine that could keep Cody’s brain alive without the hassle of his body and therefore salvage all the knowledge and skill he has accumulated over the few short months of this war, and the few short years of his life. Yes, it is a bloody option, but it’s quick. Effective. Efficient. Cody’s not afraid for it to be used on him. He’s prepared all his life for this.
After all, there’s only one Obi-Wan Kenobi, but there are 1.2 million clone troopers.
Cody grinds his teeth, something tight in his throat. Kenobi’s eyes snap open, bright blue in the glow of the bacta. There’s a gash splitting his lip from below his nose and across his chin. Yet he opens his mouth anyway.
“Cody,” Obi-Wan says through smoke-thick vocal chords. “I did what I needed to do.”
“What you needed to do was use the Extractor,” Cody spits back, and doesn’t even try to tack on sir at the end.
“You’re alive, Cody. I’m alive. We finished the campaign. We completed our mission.”
“And you took damage to a high degree, General. It’s not a win, in my mind. Not when you’re like this.” Cody stands there helplessly, and sets his helmet down on the top lid of the bacta chamber. “What can I do to make you comfortable using the Extractor? This can’t happen again.”
“Cody,” Obi-Wan pleads.
“You need practice,” Cody says, his voice hard and his face harder.
“Practice? For the Extractor?” Obi-Wan looks almost … scared.
“Yes,” Cody says, low. He snatches up his helmet. “The moment the doc says you’re fit for duty, I want you to do a mock-run on me.”
21 notes · View notes
jaggerwockyy · 2 years ago
Text
piecewise
from the series system of equations
rating: M archive warning: graphic depictions of violence (sorta? it's implied but quite disturbing) words: 1388 fandom: Star Wars: The Clone Wars (2008) relationship: CC-2224 | Cody & Obi-Wan Kenobi POV: Cody additional tags:
- cody pov - rated mature for mostly implied violence - but quite dark because body horror - headcanon: spare parts - basically the idea that clones are used to swapping out bodies and limbs like accessories - brain removal (not shown but implied) - when clones have zero bodily autonomy - idk this is just kinda dark in general - Dead Dove: Do Not Eat - please take the tags and description seriously
summary: The Extractor is a machine that removes the brains of clones in dire situations, and Obi-Wan didn't use it when he should have, so Cody makes him do a practice run.
blurb:
“You need practice,” Cody says, his voice hard and his face harder. “Practice? For the Extractor?” Kenobi looks almost … scared. “Yes,” Cody says, low. He snatches up his helmet. “The moment the doc says you’re fit for duty, I want you to do a mock-run on me.”
11 notes · View notes